Proper Date format?

Home Forums TurboCSV Support Proper Date format?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9261
    yoav
    Participant

    Hello Chris,

    Great plugin, I’m delighted to start working with it.

    Can you please post (and add to the documentation and sample files) the correct format for dates?

    There is also the ugly issue that Excel is a bit confusing about date: sometimes it stores the day as a serial number counting up from the start of 1900, and it takes some wierd formatting tricks to get it to output correctly.

    Can you advise me and the other future users on how to enter post dates under !post_date ?

     

    cheers!

     

    http://www.outreachecology.com

    http://www.outreachecology.com/landmark

    #9263
    Chris
    Keymaster

    Hi, the plugin doesn’t do any date parsing. It passes the post dates as string to WordPress. So, the date formats are those allowed by WordPress.

    In my opinion the best format is always “yyyy-mm-dd hh:mm:ss” because it’s unambiguous. You can leave off the time “hh:mm:ss” if you’re just interested in dates.

    I think WordPress uses strtotime() and will thus accept a lot of variations:
    http://www.php.net/manual/en/function.strtotime.php

    Excel does use an internal format for dates, but when you save an Excel file as .CSV I think it converts the dates to strings automatically.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.