Last post May 04, 2013 10:45 AM by aspnet2sams
May 04, 2013 10:09 AM|milade|LINK
Hello Guys ,
I have a date time in project but i don't know how it converted or coded ...
some data : 1367574200 , 1367576727 , 1367595162
please help me convert this data to datetime .
thank you .
May 04, 2013 10:13 AM|aspnet2sams|LINK
are you for syntax then Datatype.Parse(value) is for you to give try and let know.
May 04, 2013 10:27 AM|milade|LINK
aspnet sam's ,
thank you for reply .
i take this data from a webservice .
i don't know how i can save this data in my database as datetime .
May 04, 2013 10:45 AM|milade|LINK
thank you . problem solved .
bottom code can convert my data to datetime :
DateTime dt_1970 = new DateTime(1970, 1, 1);
long time = 1367672400;
long tricks_1970 = dt_1970.Ticks;
long time_tricks = tricks_1970 + time * 10000000;
DateTime dt = new DateTime(time_tricks);
thanks all .
May 04, 2013 10:45 AM|aspnet2sams|LINK
You are able to get the data that is shown in your post so i just texted to do it using
i am poniting it from the value you are able to read and that to be an actual datetime for your need in particualr snippet.