Using Date Functions in Google Looker Studio: A Cheat Sheet

4 Functions you should know when working with Date and Times

Christianlauer
CodeX

--

Photo by Waldemar Brandt on Unsplash

Often, data in a Data Warehouse, e.g. Google BigQuery for working with BI tools such as Looker Studio (formerly Data Studio) are already prepared for Data Analysis, but it can of course be the situation that you have a special case or that Looker Studio is directly connected to a tool, database or service via connector, so that you then have to map smaller ETL/ELT processes in Data Studio. For this, I have provided a cheat sheet with the most important data functions, at least in my opinion.

Function 1: Date

With this function you can create a date field or value from numbers or from a date time field or expression [1]. This is a great function, if data from a source has not yet been previously formatted as a date.

DATE(2022, 03, 03)

Function 2: PARSE_DATE & PARSE DATETIME

Similar to the function above, PARSE_DATE also works, but here you use strings as input values. The same applies to PARSE_DATETIME, except that a time is specified in addition to the date.

PARSE_DATETIME(format_string, text)
PARSE_DATE(format_string, text)

--

--

Christianlauer
CodeX
Editor for

Big Data Enthusiast based in Hamburg and Kiel. Thankful if you would support my writing via: https://christianlauer90.medium.com/membership