Imported DateTime is not correct

I have set imported file and it shows me CSV as the following value:
2023-03-14 15:07:48
When I import it is corrupted DATETIME value (just example):
0000-00-00 08:37:09
Is there an issue with the formatted value as data feed?
Need help.

How are you importing it, and what database engine are you using?
Can you show us a line from the CSV, and its value when you import it?

Was 08:37:09 the time that you imported the row?

Value is not connected to the automatic imported value according to the time and Date.
Need help why it is imported DATTIME 2023-03-14 15:07:48 but inside MYSQL it is 0000-00-00 08:37:09

It is a format:

YYYY-MM-DD HH:MM:SS

Do you think it is a corrupted data feed value (it is correctly seen inside a source feed) or it is a conversion setting issue?

Without seeing the data you’re feeding into it, shrug

Thank you for the message. It seems more complex issue as I though. I will validate again. Due to security I can not publish database.

That’s fair.

That said, sanitizing the data is definitely the first step - it’s a CSV, so make sure there’s no errant commas in the middle of data fields that might be throwing off the field count, etc.

I could somewhat understand 2023-03-14 15:07:48 getting malformed into, say, 0000-00-00 15:07:48, but to get 0000-00-00 08:37:09 makes me think its reading the wrong data into the field.

I have tested and seen settings for the fields.
It works import if I use VARCHAR, 150
It will not work DATETIME
It seems it is wrong Date and time for the field DATETIME
as it will not recognize 2023-03-14 15:07:48

MySQL should interpolate a string in the format Y-M-D H:i:s correctly, if you’ve told the importer to handle strings correctly (and you’re not using like… an ancient version of MySQL…)

What does your LOAD DATA call look like?

You gave me another perspective. You are right. We validated load data. Imported fields had wrong delimiters.
Thank you for all help.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.