Taking advantage of the CURRENT_DATETIME function in Looker Studio

Taking advantage of the CURRENT_DATETIME function in Looker Studio

Syntax of CURRENT_DATETIME Function

The syntax for this function is quite simple and leads to its minimalistic utilization. The syntax is as follows:


CURRENT_DATETIME([time_zone])

Please note, 'time_zone' which is essentially a text field or expression representing the timezone is an optional parameter. The default timezone if not specified is UTC.

Using the CURRENT_DATETIME Function

Here's how to use the CURRENT_DATETIME function:

  1. Create or edit an existing Google Data Studio report.
  2. Click on the 'Add a Field' option.
  3. In the formula tab, add CURRENT_DATETIME(). If you want to specify a time zone, amend your formula like so: CURRENT_DATETIME("America/Los_Angeles").

Examples of CURRENT_DATETIME Function

The application of the CURRENT_DATETIME function can be illustrated with a sales metrics example. In a hypothetical e-commerce platform's sales report, we can track the server invoking time for each region to evaluate server performance.

For instance:

Today's Date in UTC: February 15, 2023 09:38 PM


CURRENT_DATETIME()

Example result: 2023-2-15 09:38

Today's Date in LA: February 15, 2023 09:38 PM


CURRENT_DATETIME("America/Los_Angeles")

Example result: 2023-2-15 02:38

Limitations of CURRENT_DATETIME Function

The only noticeable limitation of this function is that it isn't available for compatibility-mode data types. Meaning, it cannot be used when the data source is in compatibility mode.

Pro Tips for CURRENT_DATETIME Function

  1. Make sure to choose the correct timezone as it would dramatically affect the output and your data analysis.
  2. Remember, if the time_zone parameter evaluates to NULL, this function also returns NULL. Therefore, ensure your time zone entries are both valid and accurate to avoid such scenarios.

Using the CURRENT_DATETIME function in Google Data Studio, you can access real-time data for improved analysis and decision-making. The versatility of this function allows you to adapt to different time zones making it a universal solution for all your data needs.

More function to use with Looker Studio

MEDIAN
:
Mastering the MEDIAN Function in Looker Studio: A Comprehensive Guide to Syntax, Use Cases, and Limitations
VARIANCE
:
Understanding the Variance Function in Looker Studio for Improved Business Strategies and Decision Making
STDDEV
:
Understanding the Power of the STDDEV Function in Looker Studio for Improved Data Analysis and Strategic Decision Making
MINUTE
:
Utilizing the MINUTE Function in Looker Studio for Precise Temporal Data Analysis and Report Generation
TAN
:
Understanding the TAN Function in Looker Studio: Features, Syntax, Practical Applications, Limitations, and Tips for Optimal Usage

Become a Looker Studio expert
for free

Learn all the secrets of data analysis and create beautiful and effective dashboards thanks to our 30-second video courses! Join Catchr's community on YouTube.

Get more video lessons

All your data on Looker Studio

Build Looker Studio dashboard easily with your marketing data from all platforms and track your essential KPIs! No-code integration.

Start free trial now!
Looker studio

Optimize your data analysis

Get free Looker Studio dashboard template among a large collection of +50 stunning template! Elevate your data visualization.

Get free templates!
Florian Cabirol
CEO of Catchr
As a web development expert, I am actively enhancing and developing Catchr connectors to optimize the processing and analysis of your marketing data.