how can i get milliseconds with a date
i am trying this
Datetime t=Convert.ToDateTime(row["TimeStamp"])
i am getting this record f开发者_如何学Pythonrom Database dat contains the milliseconds too but when i do this i lose the milliseconds how can i get the milliseconds
From this MSDN article on ToDateTime it looks like either a string or an object is being passed in. Either way, the method returns a DateTime object, which has properties Millisecond, Second etc. So, I suggest you try:
t.Millisecond
If its value is 0 then check that there are milliseconds in the original string, not just seconds.
精彩评论