sijocherian / google-bigquery

Automatically exported from code.google.com/p/google-bigquery
0 stars 0 forks source link

Add a function to cast different date formats into BQ Date type #174

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We are always seeing a need to change a specific date format into the BigQuery 
Date Format.  Example:

2/20/2014 -> 2014-20-02
20FEB2014 -> 2014-20-02

There could be all sorts of other formats, but some function like this would be 
great:
DATE_FORMAT(DATE_TO_CHANGE, CURRENT_FORMAT, NEW_FORMAT)

EX:
DATE_FORMAT('2/20/2014', 'mm-dd-yyyy', 'yyyy-mm-dd')

Additionally, the same support could be added for Timestamps

Original issue reported on code.google.com by hog...@gmail.com on 27 Oct 2014 at 6:17

GoogleCodeExporter commented 9 years ago
Sorry, This was supposed to be under Feature Request, But it wont let me 
re-classify it now.

Original comment by hog...@gmail.com on 27 Oct 2014 at 6:19

GoogleCodeExporter commented 9 years ago
I agree that it would be very useful, expecially when ingesting data from 
legacy systems or databases.

Original comment by lorenzo....@noovle.it on 1 Jul 2015 at 6:40