Ticks to DateTime

  • Thread starter Thread starter Tommy
  • Start date Start date
T

Tommy

How can I take a long variable from Datetime.Now.Ticks and restore that
number into a datetime variable?

Similar to the sample below that doesnt work.

Dim i as long = Datetime.Now.Ticks
Dim dt as Datetime = CType(i, datetime)

Thanks
 
Tommy said:
How can I take a long variable from Datetime.Now.Ticks and restore that
number into a datetime variable?

\\\
Dim n As Long = Now.Ticks
Dim d As Date = New Date(n)
///
 
Back
Top