10 Jun 19 · Ryan-Dallas ·       Add to Favorites  

Extract Month and Year from date in Bigquery

You can just use the FORMAT_DATETIME function:

SELECT
    FORMAT_DATETIME("%B, %Y", DATETIME "2018-05-09 15:30:00")
FROM yourTable;

This should print May, 2018.

Ryan-Dallas

posted on 10 Jun 19

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds

Copied