Convert "Month `YY" string format to date in Bigquery standard SQL

Nata

I have dates in the database in the following format stored as strings "April `20". I need to convert them to dates as I need to perform some calcualtioin (i.e. +12 month to a certain date). I tried CAST date as DATE but that does work and I see why. PARSE_DATE didn't work either. Yet not sure what could work. Hope someones has suggestions, much appreciated!

Nata

Alright, it was the PARSE_DATE function. And the solution in this case is

Parse_DATE('%B `%y', date)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Convert a non-standard format string to a date

Convert string in HH:MM:SS format to seconds in Google BigQuery (Standard SQL)

Convert to date format error: character string is not in a standard unambiguous format

Convert string date to date format in pyspark SQL

Pivot with Month-YY format

BigQuery convert String to Date

Convert string to date in BigQuery

How to convert multiple string formats into one date format in BigQuery?

Convert standard date format to string splitting by point in Python

Convert ISO datetime string to standard date format in Freemarker

convert a string (43677) to date format in SQL(Redshift)

Bigquery standard sql function for DATE_FORMAT(CONVERT_TZ(NOW(),'+00:00','-07:00'),'%Y-%m-%d %r')

Convert date in string format to datetime format in oracle sql

How to convert string date into valid date format in SQL Server 2008?

Convert BigQuery's legacy SQL to standard SQL

Convert SQL Dates to standard format

Convert date format for SQL

Convert string to date then format the date

String date format convert to date

writing legacy views in Standard SQL format in Bigquery

How do I convert date (YYYY-MM-DD) to Month-YY and groupby on some other column to get minimum and maximum month?

How to convert timestamp to seconds in BigQuery Standard SQL

Declare variable with date function in standard SQL bigquery

Date function in standard SQL in Google bigquery

Split column, and then convert different date types to standard date format (YYYY-MM-DD) - SQL Server

Convert one column to standard date format in Python

Convert string date column into standard date in R

format SQL date string

Convert date string to another date string format