Reputation: 271
If I have a Date parameter such as: 03. Mar at 5:00pm PST
and I only need to break it down by date so that my end result is: 03. Mar
how can I achieve that? Is there a substring equivalent syntax in Google BigQery? Or maybe a date/time function to show only date and ignore the time?
Thanks
Upvotes: 1
Views: 2257
Reputation: 59325
Is this a string manipulation question? Then the answer would be getting the LEFT() 2 characters of that string.
If this is a date manipulation question:
SELECT TIMESTAMP('2014-03-03 05:00:00')
2014-03-03 05:00:00 UTC
SELECT DATE(TIMESTAMP('2014-03-03 05:00:00'))
2014-03-03
SELECT DAY(TIMESTAMP('2014-03-03 05:00:00'))
3
Upvotes: 2