Reputation: 11
I'm currently working with CSV data and trying to import into datastudio. The Date format in CSV is "dd/mm/yyyy hh:mm" EXAMPLE: "12/05/2021 16:30"
When I put data into the data studio The date came out as "5 DEC 2021" (A date in the future?)
Please, I need help.
Upvotes: 1
Views: 1169
Reputation: 3421
It is parsing your date in mm/dd/yyyy
format (month before the day), which is very common problem.
To avoid this kind of problem, I would say it is a good practice to always use the ISO 8601 format, that means yyyy-mm-dd
.
If you can't change the CSV data source, I suggest you to treat the column as a STRING
and add a calculated field to parse the string creating a new date field. Like in this example:
PARSE_DATETIME("%d/%m/%E4Y %H:%M", Your_CSV_Field) # if the time part is relevant
PARSE_DATE("%d/%m/%E4Y", Your_CSV_Field) # if the time part is NOT relevant
This way, you can freely use any date format.
Upvotes: 0