Click here to Skip to main content
15,912,204 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to convert string to Datetime including milliseconds Pin
BobJanova8-Nov-12 23:24
BobJanova8-Nov-12 23:24 
You are misunderstanding Pete's solution. Convert.ToDateTime is already giving you the right answer, but the default ToString on a DateTime omits the milliseconds, so it looks like it isn't when you look at the string representation of the DateTime you create. If you format it with milliseconds, you'll see that you got what you expected.

I just tried that very thing:

   dt←$Convert:ToDateTime "2012-11-09 07:20:07.410"
09/11/2012 07:20:07
   dt:Millisecond
410
   dt:ToString "yyyy-MM-dd hh:mm:ss.fff"
2012-11-09 07:20:07.410

GeneralRe: How to convert string to Datetime including milliseconds Pin
Vijay Kanda11-Nov-12 19:15
Vijay Kanda11-Nov-12 19:15 
GeneralRe: How to convert string to Datetime including milliseconds Pin
BobJanova11-Nov-12 22:10
BobJanova11-Nov-12 22:10 
Questionhow to sort Datalist using Dropdown which is not in the datalist control Pin
sreeCoderMan7-Nov-12 21:19
sreeCoderMan7-Nov-12 21:19 
Questiondatagridview child rows Pin
mynamearan7-Nov-12 20:18
mynamearan7-Nov-12 20:18 
AnswerRe: datagridview child rows Pin
Wayne Gaylard7-Nov-12 21:14
professionalWayne Gaylard7-Nov-12 21:14 
GeneralRe: datagridview child rows Pin
Mycroft Holmes7-Nov-12 22:08
professionalMycroft Holmes7-Nov-12 22:08 
GeneralRe: datagridview child rows Pin
Wayne Gaylard7-Nov-12 22:32
professionalWayne Gaylard7-Nov-12 22:32 
QuestionC# linq to sql default problem Pin
sc steinhayse7-Nov-12 12:57
sc steinhayse7-Nov-12 12:57 
AnswerRe: C# linq to sql default problem Pin
Mycroft Holmes7-Nov-12 13:12
professionalMycroft Holmes7-Nov-12 13:12 
GeneralRe: C# linq to sql default problem Pin
sc steinhayse7-Nov-12 18:14
sc steinhayse7-Nov-12 18:14 
GeneralRe: C# linq to sql default problem Pin
Mycroft Holmes7-Nov-12 18:26
professionalMycroft Holmes7-Nov-12 18:26 
AnswerRe: C# linq to sql default problem Pin
jschell8-Nov-12 8:49
jschell8-Nov-12 8:49 
QuestionReplicate a class from an assempli and add a new constructor Pin
PozzaVecia7-Nov-12 11:45
PozzaVecia7-Nov-12 11:45 
AnswerRe: Replicate a class from an assempli and add a new constructor Pin
Mycroft Holmes7-Nov-12 13:07
professionalMycroft Holmes7-Nov-12 13:07 
AnswerRe: Replicate a class from an assempli and add a new constructor Pin
DaveyM697-Nov-12 18:42
professionalDaveyM697-Nov-12 18:42 
GeneralRe: Replicate a class from an assempli and add a new constructor Pin
PozzaVecia7-Nov-12 22:41
PozzaVecia7-Nov-12 22:41 
GeneralRe: Replicate a class from an assempli and add a new constructor Pin
DaveyM698-Nov-12 18:39
professionalDaveyM698-Nov-12 18:39 
GeneralRe: Replicate a class from an assempli and add a new constructor Pin
Andy4118-Nov-12 20:53
Andy4118-Nov-12 20:53 
QuestionHow to structure my application Pin
ASOSEA7-Nov-12 1:11
ASOSEA7-Nov-12 1:11 
AnswerRe: How to structure my application Pin
Pete O'Hanlon7-Nov-12 1:34
mvePete O'Hanlon7-Nov-12 1:34 
GeneralRe: How to structure my application Pin
ASOSEA7-Nov-12 2:53
ASOSEA7-Nov-12 2:53 
AnswerRe: How to structure my application Pin
Mycroft Holmes7-Nov-12 11:34
professionalMycroft Holmes7-Nov-12 11:34 
QuestionConvert PPT to image Pin
Er. Neel Kamal7-Nov-12 0:54
professionalEr. Neel Kamal7-Nov-12 0:54 
Questionhow to report the single record into crystal report Pin
sri apple6-Nov-12 20:02
sri apple6-Nov-12 20:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.