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")
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top