Looker Studio Date Format Guide

Looker Studio Format Date

In the realm of data analytics, presenting your data in a comprehensible and visually appealing manner is crucial. Looker Studio, a powerful tool for data visualization and business intelligence, offers various ways to format date dimensions to suit your reporting needs. This guide delves into the practical aspects of manipulating date formats in Looker Studio, ensuring your reports are not only informative but also intuitively structured.

Format by Editing Dimension Properties


A straightforward method to format dates in Looker Studio is by editing the dimension properties. This approach is user-friendly and doesn’t require complex formulas.

How to Edit Dimension Properties

  • Select your date dimension in the report.
  • Click on the pen icon (edit tool) next to the dimension name.
  • Choose the desired date format from the list of pre-defined formats.

Example:

Original Date: 2024-01-22
Formatted Date: January 22, 2024

Format Using Formulas: WEEK, MONTH, DAY

For more flexibility, Looker Studio allows the use of formulas like WEEK(your_date_dimension), MONTH(your_date_dimension), and DAY(your_date_dimension) to extract specific parts of a date.

Using Formulas:

  • Use MONTH(date) to extract the month from a date.
    • MONTH(your_date_dimension)
  • Apply WEEK(date) to get the week number.
    • WEEK(your_date_dimension)
  • Utilize DAY(date) to fetch the day of the month.
    • DAY(your_date_dimension)

 

Example:

Original Date: 2024-01-22
Month: January (01)
Week: 4
Day: 22

 

Creating Custom Formats with FORMAT_DATETIME

When predefined formats don’t meet your needs, FORMAT_DATETIME comes to the rescue. This function allows you to create entirely custom date formats.

How to Use FORMAT_DATETIME

  • The syntax is FORMAT_DATETIME(“desired_format”, date).
  • You can combine different format elements to create your custom format.

Example:

FORMAT_DATETIME("%A, %d of %B %Y", date)
Result: Tuesday, 22 of January 2024

You can use many sorts of formatting strings in this function. Here follows a list of the formatting strings you can use, to have your date presented any way you’d like:

Format StringResultComment
%Y-%m-%d2024-01-01Year-month-day
%d/%m/%Y01/01/2024Day/month/year
%B %d, %YJanuary 01, 2024Full month name, day, year
%d %b %Y01 Jan 2024Day, abbreviated month name, year
%A, %B %d, %YTuesday, January 01, 2024Full weekday name, full month name, day, year
%a, %b %d, %YTue, Jan 01, 2024Abbreviated weekday name, abbreviated month name, day, year
%Y/%m/%d %H:%M:%S2024/01/01 09:30:29Year/month/day Hours:Minutes:Seconds
%H:%M:%S09:30:29Hours:Minutes:Seconds
%I:%M %p09:30 AMHours:Minutes AM/PM
%Y-%m-%dT%H:%M:%S2024-01-01T09:30:29ISO 8601 format
%Y-%j2024-001Year and day of the year (Julian date)
%U, %Y01, 2024Week number of the year, Year
%W, %Y00, 2024Week number of the year (starting with Monday), Year
%x01/01/24Locale’s appropriate date representation
%X09:30:29Locale’s appropriate time representation


Using CURRENT_DATE and CURRENT_DATETIME

These functions are vital for reports that require the current date or datetime, like generating real-time analytics.

Implementing CURRENT_DATE and CURRENT_DATETIME:

  • CURRENT_DATE() returns the current date.
  • CURRENT_DATETIME() provides the current date and time.

Example:

CURRENT_DATE() -> 2024-01-22
CURRENT_DATETIME() -> 2024-01-22 12:01:02

 

Summary

Mastering date formats in Looker Studio enhances the clarity and effectiveness of your data visualizations. Whether it’s a simple tweak using the dimension properties, extracting specific date components, crafting a custom format with FORMAT_DATETIME, or employing real-time data with CURRENT_DATE and CURRENT_DATETIME functions, each method offers unique advantages. By applying these techniques, you can ensure your reports are not only precise but also resonate with your audience’s needs.

We hope this guide assists you in your journey with Looker Studio. Remember, the right date format can transform a good report into a great one!