I have table which hold timestamp in number format but the data type of the table column is string.
How to type cast it to timestamp or date format in looker ?
example:
In looker explore I could see value in 1600000 something like this , instead of 12/08/09 or 12/08/09 00:92:89 .
Any help will be appreciated !
I guess you want to convert epoch time
You can achieve this with the help of liquid .
html:{{ '1609999' | date: "%d-%m-%Y" }};;
Do make sure the input time is correct .
if you want to display the date time in different formats visit link
Hi RajiPrabha!
I’d suggest to perform this convert/cast process in SQL side , this will allow us to use this timestamp field with all advantages of datetime datatype in looker.
Please find one example for postgres databases:
https://stackoverflow.com/questions/26198358/postgresql-cast-numeric-to-date-and-format
Hope this helps!
Best regards,
Leo