Quick question: how can I get 6 digits milliseconds? the limit is 3. other alternatives? suggestions?
DateTime dt = new DateTime(2008, 08, 08, 08, 10, 10, 100)
Quick question: how can I get 6 digits milliseconds? the limit is 3. other alternatives? suggestions?
DateTime dt = new DateTime(2008, 08, 08, 08, 10, 10, 100)
Milli is a prefix meaning thousands. Thus, one millisecond is one thousandth of a second. What you probably mean by "6 digit milliseconds" is microseconds.
Luckily, DateTime internally stores Ticks with a resolution of 100 nanoseconds (= 0.1 microseconds), so you can just read the Tick property and divide it by 10 to get the total number of microseconds that have elapsed since 12:00:00 midnight, January 1, 0001.