ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How do you read this date "1317062195"? (DATE FORMAT QUESTION)

February 02, 2012 3:28pm

Subscribe [3]
  • #1 / Feb 02, 2012 3:28pm

    rwoodlevlane

    11 posts

    Hello all. When using Freeform, the entry_date field has a value of “1317062195”.
    The documentation reads that it follows EE Date formatting so I am asking in this forum.

    I understand EE date formatting as found here

    http://ellislab.com/expressionengine/user-guide/templates/date_variable_formatting.html

    I just am not sure how to understand the date when written as “1317062195”.

    I am trying to deduct the date/year from it.

    Thanks
    Rich

  • #2 / Feb 02, 2012 3:31pm

    rwoodlevlane

    11 posts

    After writing this, I realized it may be a 10 digit unix time stamp that I am seeing. I will research that path of thinking now…

  • #3 / Feb 02, 2012 3:47pm

    glenndavisgroup

    436 posts

    Hi Rich,

    EE stores its date/time as a Unix time stamp which is in seconds. The number you are seeing is the number of seconds since Jan-1-1970. You have to use a date format to convert it to a proper date/time or if you are using PHP you need to use something like the Date() function. I hope that helps.

    Mike

  • #4 / Feb 02, 2012 4:12pm

    rwoodlevlane

    11 posts

    haha I knew it! I actually was just explaining “computer time” to my colleague. I had to use Jan 1, 1970 for some client-side date scripts and considered that it was the answer but expected the number to be higher. Thanks a lot!

  • #5 / Feb 03, 2012 4:10pm

    Kyle Cotter

    730 posts

    Thanks for the assist here Mike!

    rwoodlevlane, is your issue all taken care of?

    Thanks.

  • #6 / Feb 03, 2012 4:11pm

    rwoodlevlane

    11 posts

    Yep. I apologize for not wrapping it up. Thanks to both of you!  This is resolved.
    Rich

  • #7 / Feb 03, 2012 4:13pm

    Kyle Cotter

    730 posts

    Glad to hear it Rich!

    If you have any more questions, feel free to start a new thread.

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases