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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -