Date formatting in BigQuery -
i have found many date functions cloud bigquery , have specific case , none of available functions seem work. data have date column in 'mmddyy' format , convert 'yyyy-mm-dd' format. how can achieve this?
this 1 possibility:
#standardsql data as( select '072817' dt union select null union select '' ) select if(dt != '', format_date("%y-%m-%d", parse_date("%m%d%y", dt)), dt) data
Comments
Post a Comment