I have a date field in google sheets that is formatted as a date fiels YYYY-MM-DD. I download this as xlsx to then use as a data source in Studio Pro. This date field surfaces as a 6 digit number- what formula can I use to convert to date?
I tried
PARSE_DATE(“%y%m%d”, CAST(Month AS TEXT) )
But this gives me an error. Could someone supply the correct formula?
It would help if you could post an example of a date in Google Sheet and the corresponding 6 digit number in the Excel file. Screenshots would help, too.
Can we utilise your formula directly as a calculated field in Studio? I tried DATETIME_ADD(1900-01-01, INTERVAL Month DAY) but it gives me this error:
Invalid formula - Function “DATETIME_ADD” doesn’t support DATETIME_ADD(NUMBER, INTERVAL NUMBER part). Function “DATETIME_ADD” supports DATETIME_ADD(DATE, INTERVAL NUMBER part), DATETIME_ADD(DATETIME, INTERVAL NUMBER part).
Hi, in my Looker Studio, the custom field is in ‘date’ format. Therefore, you need to change the field format to ‘date’. Please check the screenshot for reference
Hi! I tried to change it from number to date but I got this error. I also tried a formula in LS itself but then I get an error to say it’s a unsupported field type- this function supports integers. But I cannot change it from Integer to date. So I’m very confused
Yes, when you create a new column in an Excel file, just import it directly into Looker Studio. Also, remember to check if the new column (new month) is set to the “date” type. I checked your screenshot, and yours is set to “string,” which I believe is one of the main reasons for the issue.
Here are my steps:
Add a new column in the Excel file using the formula: =A2 + DATE(1900,1,1) - 2
Import the file into Looker Studio
Verify that the column is correctly set to the “date” type