In Google Dataprep when I apply min() to a date it gives a long serial number e.g. 1304985600000. I'm trying to get the first order date of a customer but I can't seem to do anything with this number
Thanks
In Google Dataprep when I apply min() to a date it gives a long serial number e.g. 1304985600000. I'm trying to get the first order date of a customer but I can't seem to do anything with this number
Thanks
It's a UNIX timestamp represented in milliseconds. With this value in BigQuery, simply do:
SELECT TIMESTAMP_MILLIS(1304985600000)
Output:
Row f0_
1 2011-05-10 00:00:00.000 UTC
You can convert the unix timestamp to a Date in Cloud Dataprep using the UNIXTIMEFORMAT
function: https://cloud.google.com/dataprep/docs/html/UNIXTIMEFORMAT-Function_57344709