Search code examples
google-bigquerygoogle-cloud-dataprep

Google Dataprep Date Serial Number


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


Solution

  • 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