• Resolved gmorg313

    (@gmorg313)


    Hi, I’m having trouble importing dates from a .csv file. In the file I’m trying to import each row has an entry in a column called Date formatted ’18-04-2008′, ’26-04-2008′, etc. When I import this into a column with the date format they all come out as 30/11/-0001.

    I’m very new to this, so this is likely something very simple, I just can’t figure out what it is, and would appreciate some help…

    thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi,

    Welcome!

    WP Data Access does not support CSV imports. Only SQL files… Are you at the right support forum? 🙂

    Bes regards,
    Peter

    Thread Starter gmorg313

    (@gmorg313)

    Oops… I missed a step, sorry! I’ve converted the csv to an sql file… In the SQL file they’re formatted 18-04-2008′, ’26-04-2008′, etc.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    No problem!

    Can you sent me the SQL file?

    If you sent me a private message from the plugin website (wpdataaccess.com), I’ll reply to give you my email adress.

    Best regards,
    Peter

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Topic closed!

    For anyone interested in the solution:

    Format in SQL insert must be: YYYY-MM-DD
    For other formats use: STR_TO_DATE
    Example DD-MM-YYYY: STR_TO_DATE(’18-04-2008′,’%d-%m-%Y’)

    Peter

    sonisitez

    (@sonisitez)

    How I can using this Peter?
    DD-MM-YYYY: STR_TO_DATE(’18-04-2008′,’%d-%m-%Y’)

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Where do you want to use this? And how?

    Thanks,
    Peter

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Importing dates’ is closed to new replies.