Convert from UTC long value to DateTime value

  • Thread starter Thread starter Stefano Del Furia
  • Start date Start date
S

Stefano Del Furia

Hi,
i have an UTC value like
1131030339.010

Is there a way of converting it to a DateTime values ?
Thanks in advance
Stefano
 
Milliseconds.
But probably i haven't explained mh problem very well.
UTC is not the "Universal Coordinated Time" but the "UNIX Epoch" time.
Thanks in advance
stefano
 
Stefano Del Furia said:
Milliseconds.
But probably i haven't explained mh problem very well.
UTC is not the "Universal Coordinated Time" but the "UNIX Epoch" time.

So you have a number of milliseconds after a specific time? I'd create
a "constant" (public readonly static) DateTime which represents the
Unix Epoch (if there isn't one already) and then just call
AddMilliseconds() with the number of milliseconds. The returned
DateTime is the one you want.
 
Back
Top