timestamp

  • Thread starter Thread starter Crirus
  • Start date Start date
* "Crirus said:
How to get a timestamp for curent time?

Where? In your application? In a database?

You can get the current time using 'DateTime.Now'.
 
In my application.. found ticks and is fine, just need to convert to
seconds...I dont need smaller precision than second
 
* "Crirus said:
In my application.. found ticks and is fine, just need to convert to
seconds...I dont need smaller precision than second

You can use the 'Ticks' property to get 100 nanosecond intervals since
1. Januar 1, 00:00:00. For example:

\\\
Dim s As Long = DateTime.Now.Ticks
MsgBox("Time: " & (s * 10 ^ -9) & " seconds")
///
 
Yes
Thanks
Crirus

Herfried K. Wagner said:
You can use the 'Ticks' property to get 100 nanosecond intervals since
1. Januar 1, 00:00:00. For example:

\\\
Dim s As Long = DateTime.Now.Ticks
MsgBox("Time: " & (s * 10 ^ -9) & " seconds")
///
 
Back
Top