Home Forums General Issues Date format Datepicker for CSV Import?


Date format Datepicker for CSV Import?

  • I’m trying to import a large number of custom posts. They all have a field for a date, which I want to use the DatePicker for. So far, none of the imports will show the date in the Datepicker field. Right now i’m trying ‘yyyymmdd’ as the format in my CSV. What format should it be for the datepicker to see it??

  • Hi @aaronrobb

    The date picker will use the save_format option to load and save data to.

    What is the save_format option set to?

  • The save format is set to yymmdd
    Looks like for some reason, I have to make the CSV’s date to be yyyymmdd and the save format to just the yymmdd which really doesn’t make sense, but it seems to have worked.

  • New question/problem along these lines.
    Just imported a CSV with a date field, in the format of ‘yymmdd’, and now the Datepicker doesn’t show anything on the admin editor page. Just a blank field. Save value is set to yymmdd, display is set to dd/mm/yy.
    Just tested with a text field instead and the yymmdd value shows up. Any idea why the datepicker field will just show blank?

  • Hi @aaronrobb

    Just to confirm, do you full understand the difference between the JS format string and PHP format string?

  • Hey Elliot,

    I’m thinking that I don’t since I can’t get it to work. 🙂

  • I hate to drag a two year old topic to the surface, but I’m wondering the same thing? I’m trying to import a large CSV with some dates and am unable to get the dates to show up properly in my Datepicker fields.

    Currently, my dates are formatted in the CSV so j/m/Y, for example: 7/5/2003.

    How should they be formatted in the CSV to be imported properly so ACF can read and display these dates properly?

    Ok, that didn’t take too long to figure out. I looked in the database when setting the fields correctly through the ACF form, and saw that the dates were stored like YYYYMMDD or 20030507. Converting the dates in my spreadsheet (Google Drive, via `Format -> Number -> More Formats -> More date and time Formats…) and everything’s working perfectly.

  • 5 years later and I’m having a similar issue. Is save_format the equivalent of return_format?

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Date format Datepicker for CSV Import?’ is closed to new replies.