Date and Time Data Types in Google Data Studio – Tutorial

When you create or edit a data source schema in Google Data Studio, you get the option to select the data type of the data source schema field. 

One of the data types supported by Google Data Studio is: ‘Date & Time’:

As you can see from the screenshot, Google Data Studio supports several different types of date and time.

The data types for ‘date’ fields

The data types for ‘date’ fields can be divided into the following two categories:

#1 Absolute dates – It refers to a specific date that you can point to on a calendar. For example: 

  • 2020
  • Quarter 2, 2020
  • Oct 2020
  • Oct 2, 2020.

#2 Relative dates – It refers to a date that you can not point to on a calendar. For example: 

  • Quarter 2
  • October
  • Mon

The data types for ‘time’ fields

The data types for ‘time’ fields can be divided into the following two categories:

#1 Absolute time – It refers to a specific time that is accompanied by an absolute date. For example: 

  • Sept 10, 2020 10 PM
  • Sept 10, 2020, 10:30 PM
  • Sept 10, 2020, 10:30:14 PM

#2 Relative time – It refers to a specific time that is not accompanied by an absolute date. For example: 

  • 1 am
  • 3 am
  • 7 pm

Absolute dates

Absolute date is the date that you can point to on a calendar.

Following are examples of absolute dates:

  • 2020
  • Q1 2020
  • Nov 2020
  • Nov 10, 2020

Absolute date types

These are the data types meant for absolute dates.

The following are examples of absolute date types in Google Data Studio:

  • Date
  • Year
  • Year Quarter
  • Year Month
  • ISO Year Week 

The best practice is to always use the full date in your data source for all the fields which use absolute date types and then adjust the field type in your data source schema.

For example, consider the following Google Sheets data source schema:

Here we are using the full date in our data source for all the fields which use absolute date types.

If we create a data source schema from this data source, it would look something like the one below:

Let’s adjust the field types of various date fields:

Now if we create a report from this data source schema, it would look something like the one below:

As you can see from the report above, a date field’s type is not always the same as its display format. 

The visual appearance of the actual date in the report depends upon the following two factors:

  • Your Google account’s language setting. 
  • How data aggregates in individual charts

Get the ebook on Google Data Studio (50+ Pages)Get the ebook on Google Data Studio (50+ Pages)

Using incorrect absolute date type

Consider the following Google Sheets data source:

Here the field ‘order date’ contain dates in the format: YYYY-MM

So when setting up the data source schema, we should set the data type of ‘Order Date’ field to ‘Year Month’:

But what if we set the data type of ‘Order Date’ field to Date:

The data type ‘Date‘ tells data studio to expect year, month and day in the ‘order date’ fields in the underlying data source.

Now since the day information is missing in our data source, what data studio will do is, add the default day ‘1’ to your report.

So when you create a report from the data source schema, it would look like the one below:

But this report doesn’t match with our data source:

The ‘Order Date’ 2019-01 in our data source denotes ‘Jan 2019’ and not ‘Jan 1, 2019’.

The ‘Order Date’ 2019-02 in our data source denotes ‘Feb 2019’ and not ‘Feb 1, 2019’.

.

.

The ‘Order Date’ 2019-12 in our data source denotes ‘Dec 2019’ and not ‘Dec 1, 2019’.

That’s why using the correct absolute date type (the one that matches with your data source) is very important. 

Absolute time types

An absolute time refers to a specific time that is accompanied by an absolute date.

Following are examples of absolute time:

  • Sept 10, 2020 10 PM
  • Sept 10, 2020 10:30 PM
  • Sept 10, 2020 10:30:14 PM
  • Sept 10, 2020 22:30:14

Data types for absolute time

These are the data types meant for absolute times.

The following are the data types for absolute time in Google Data Studio:

  • Date & Time
  • Date Hour
  • Date Hour Minute

The best practice is to always use the full date and time in your data source for all the fields which use absolute time type and then adjust the field type in your data source schema.

For example, consider the following Google Sheets data source:

Here we are using the full date and time in our data source for all the fields which use absolute time types.

If we create a data source schema from this data source, it would look something like the one below:

Let’s adjust the field types of various time fields:

Now if we create a report from this data source schema, it would look something like the one below:

Changing a field’s type from absolute date to absolute time

You should change a field’s type from absolute date to absolute time only when the time information is available in your data source. Otherwise, you will get an incorrect/unexpected time data in your report.

For example, consider the following Google Sheets data source:

Here the ‘order date’ field does not contain any time data. 

Now let’s set the data type of ‘Order Date’ field from ‘Date’ to ‘Date & Time’:

The data type ‘Date & Time’ tells data studio to expect both date and time data in the ‘order date’ field in our data source.

Now since the time information is missing in our data source, what data studio will do is add the default hour ‘12’, default minute ‘0’ and default second ‘0’ to all ‘order date’ fields to our report.

The default time that data studio would append to the dates in the ‘Order Date’ field would be 12:00:00 am

So when you create a report from the data source schema, it would look like the one below:

That’s why it is important that you change a field’s type from absolute date to absolute time only when the time information is available in your data source. 

Relative dates

Relative date is the date that you can not point to on a calendar.

Following are examples of relative dates:

  • Q1, Q2, Q3, Q4 – here we don’t know, we are referring to the quarter of which year. 
  • Jan, Feb, March, April… – here we don’t know, we are referring to the month of which year. 
  • Mon, Tue, Wed, Thu… – here we don’t know, we are referring to the day of which week or month or year. 

Relative date types

These are the data types meant for relative dates.

The following are examples of relative date types in Google Data Studio:

  • Quarter
  • Month
  • ISO Week
  • Month Day
  • Day of Week
  • Day of Month

The best practice is to always use the full date in your data source for all the fields which use relative date types and then adjust the field type in your data source schema.

For example, consider the following Google Sheets data source:

Here we are using the full date in our data source for all the fields which use relative date types.

If we create a data source schema from this data source, it would look something like the one below:

Let’s adjust the field types of various date fields:

Now if we create a report from this data source schema, it would look something like the one below:

As you can see from the report above, a date field’s type is not always the same as its display format.

Relative time types

Relative time is the time that is not accompanied by an absolute date.

Following are examples of relative time:

  • 1 am, 3 am, 7 pm, etc – here we don’t know which day, month or year the time occurred. 

Data types for relative time

These are the data types meant for relative times.

Following are data types for relative time in Google Data Studio:

  • Hour
  • Minute

The best practice is to always use the full date and time in your data source for all the fields which use relative time types and then adjust the field type in your data source schema.

For example, consider the following Google Sheets data source:

Here we are using the full date and time in our data source for all the fields which use relative time types.

If we create a data source schema from this data source, it would look something like the one below:

Let’s adjust the field types of various time fields:

Now if we create a report from this data source schema, it would look something like the one below:

Best practices for changing the date and time fields

Google recommends the following best practices for changing the date and time fields in Data Studio:

Best practice #1: Avoid changing a relative date field to absolute date field

That’s because the new field won’t have sufficient information to function properly as a complete date.

Best practice #2: Avoid changing a relative time field to absolute time field

That’s because the new field won’t have sufficient information to function properly as a complete time.

Best Practice #3: Avoid changing date field type to an incompatible data type

You should only change the date field type to another type that is compatible with the corresponding data in your data source. Changing to an incompatible data type can cause an error(s) in your reports.

Best Practice #4: Avoid changing time field type to an incompatible data type

You should only change the time field type to another type that is compatible with the corresponding data in your data source. Changing to an incompatible data type can cause an error(s) in your reports.

Best practice #5: Avoid changing date/time type at the individual chart level

You can change the date/time type both at the data source schema level and at the individual chart level (via the ‘edit’ mode of your report). 

However, you should change the date/time type only at the data source schema level. 

When you change the date/time type at the data source schema level, you are changing it globally for every report (attached to your data source schema) and for every chart in your report that uses that date/time field.

When you change the date/time type only for a specific chart (like ‘table’) in your report, you could create data discrepancies as the rest of the charts in your report would still use the date/time types set at the data source schema level.

Best practice #6: Change date/time types by making a copy of the existing field

Google recommends that if you want to change the date/time types at the data source schema level then the best way to do that is by making a copy of the existing date/time field via the data source schema editor.

Follow the steps below to do that:

Step-1: Navigate to your data source schema editor and then click on the three dots next to your date/time field:

When you click on the three dots, you are going to see a drop-down menu like the one below:

Step-2: Click on ‘Duplicate’:

You should now see the duplicate of ‘Order Date & Time’ field in your data source schema as ‘copy of Order Date & Time’:

Step-3: Rename your data source schema field by double-clicking on the field name:

And then entering the new name:

Step-4: Press the enter key to confirm the new field name. Once you press the enter key, the field name will appear as a green chip:

Step-6: Change the data type of your new field by selecting a new date/time type from the drop-down menu:

Step-7: Now can safely use this new field in your report:

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

Himanshu Sharma

Digital Marketing Consultant and Founder of Optimizesmart.com

Himanshu helps business owners and marketing professionals in generating more sales and ROI by fixing their website tracking issues, helping them understand their true customers' purchase journey and helping them determine the most effective marketing channels for investment.

He has over 12 years of experience in digital analytics and digital marketing.

He was nominated for the Digital Analytics Association's Awards for Excellence. The Digital Analytics Association is a world-renowned not-for-profit association that helps organisations overcome the challenges of data acquisition and application.

He is the author of four best-selling books on analytics and conversion optimization:

error: Alert: Content is protected !!