How do I get the string value of the ten millionths of a second? "fffffff"
+1
A:
myDateTime.ToString("fffffff") should work. Is that giving some sort of error?
Also, this is from the page you linked
Although it is possible to display the ten millionths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On the Windows NT 3.5 (and later) and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
Greg
2010-06-26 12:43:41
yes it is :( ..
K001
2010-06-26 12:46:37
@Khou - It works here: `DateTime.Now.ToString("fffffff")`, what error are you getting?
Nick Craver
2010-06-26 12:47:57
Didn't need it to be meaningful, just need a counter to count up using time. Need at least 7 to 8 digits, so 00000001 to 99999999.
K001
2010-06-26 12:51:59
Getting "Cannot implicitly convert type 'System.DateTime' to 'string'"
K001
2010-06-26 12:53:03
@Khou: Then you're not using the code shown. Please edit your question with the code you're actually using.
Jon Skeet
2010-06-26 12:54:59
@Khou - It sounds like [`Stopwatch`](http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx) is more appropriate here.
Nick Craver
2010-06-26 12:55:23
@Jon, sorry you are right, my fault, i checked again and it works!
K001
2010-06-26 13:01:17