Converting Excel Date Type in Looker

(Nicholas Wong) #1

Trying to convert Excel date (string) to date in Looker? Hit into this problem just now…

17%20PM

So when you export to CSV and try to upload it to Snowflake and try to analyze it… You will see a string of numbers like 43531 which is essentially 3/7/19 on Excel. Declaring it as date or time wouldn’t change anything…

Here’s how to resolve it:
DATEADD(day, ${TABLE}.“DATE”, DATE_FROM_PARTS(1900, 1, 1))

1 Like