Kevin Thomas <Se**********@Spam.com> wrote:
I have a date value in a table SQL Server database that looks like this:
2005-10-11 12:54:36.860
When I load the record into a dataset in VB.NET and retrieve the date value
into code, what I get is:
#10/11/2005 12:54:36 PM#
It has chopped off the milliseconds. How do I get the full date and time
with milliseconds returned? In other words, what I need back is either
this:
2005-10-11 12:54:36.860
or this
#10/11/2005 12:54:36.860 PM#
Well, there are two issues here:
1) Formatting a date to include milliseconds
2) Whether or not you're retrieving all the information in the first
place
1) can be sorted by looking up "date and time format strings" in MSDN.
That will show you whether 2) is actually a problem or not - I suggest
you check out 1) and then come back to us as to whether any data is
actually being lost.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too