Convertion From "epoch time"

T

Tony

Hi, I'm having a big problem here. We are going to have
someone send us an XML file. Which contain 2 fields with
Epoch time. Is there a function in .NET or anything which
can convert the Epoch time to human readable form?

Thanks in advance.

Tony
 
D

Dino Chiesa [Microsoft]

int t= 1070390676; // value of time_t
System.DateTime dt= new System.DateTime(1970,1,1).AddSeconds(t);

Be careful of timezones.
 

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

Top