Page 1 of 1

Converting timestamps

Posted: Wed Aug 14, 2013 4:38 pm
by Babyprincess
Hello,

Currently i have time stamps in Epoch format in my database. How do i convert it to normal date format.

Re: Converting timestamps

Posted: Wed Aug 14, 2013 5:19 pm
by dunbarx
Hi.

Well, I just looked up to see what "Epoch" time was.

Since that protocol starts at midnight, 1/1/1970 GMT, you are already in good shape. LC uses the same base. Watch your timezone, of course.

Craig Newman

EDIT:

Was your question how to convert the format? Look up both "seconds" and "convert" in the dictionary. Pay particular attention to the "dateItems" format, which gives great information, and you can manipulate the individual items in that string to change to a new date.

Re: Converting timestamps

Posted: Wed Aug 14, 2013 5:32 pm
by Babyprincess
Hi Dunbarx,

Thanks. Will look into it (:

Re: Converting timestamps

Posted: Thu Aug 15, 2013 4:38 pm
by Gautami
Hey BabyPrincess,

you have to
-----------------------
convert "timestamp" to dateItems
convert it from dateItems to long date and long time
-----------------------

Reg,
G

Re: Converting timestamps

Posted: Thu Aug 15, 2013 7:19 pm
by Babyprincess
Thanks everyone.

I managed to get it working perfectly !

God bless (: