How to convert an Epoch timestamp to a Date in Standard SQL
I didn't find any simple answer to this while I was looking around, so I thought I'd put it up here in case anyone was having the same problem as me with what should have been a trivial issue. I was using ReDash analytics with Google's BigQuery and had turned on Standard SQL in the datasource settings. For the purposes of my query, I needed to convert a timestamp - unix time in milliseconds, as a string - to a Date format so that I could use the DATE_DIFF method. As an example... "1494865480000" to "2017-05-15" The difficulty was that casting and conversion was excessively strict and there