Date and Time Data Types in Google Data Studio – Tutorial

When you create or edit a data source in Google Data Studio, you get the option to select the data type of the data source 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 can be divided into following two categories:

  • Absolute Dates
  • Relative Dates

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

  • Absolute time 
  • Relative time

 

Absolute Dates

Absolute date refers to a specific date which you can point to on a calendar. 

Following are examples of absolute dates in the context of Google Data Studio:

  • 2019
  • Q1 2019
  • Nov 2019
  • Nov 10, 2019

 

Absolute Date types

These are the data types meant for absolute dates.

Following are absolute date types:

  • Year (YYYY) – example: 2017, 2018, 2019 etc
  • Year Quarter (QYYYY) – example: Q1 2019, Q2 2019, Q3 2019 etc
  • Year Month (YYYYMM) – example: Oct 2019, Sept 2019, Nov 2019 etc.
  • ISO Year Week (YYYYww) 
  • Date (YYYYMMDD) – example: 2019-01-03, 2019-01-03, 2019-01-05 etc

 

You should select that data type for your absolute date which matches with the date type in your data set. 

For example, consider the following data set:

 

Here the field ‘order date’ contains date in the format: YYYY-MM-DD

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

Here is how the report created from this data source would look like:

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 report depends upon the following two factors:

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

 

Consider another data set:

Here the field ‘order date’ contains date 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 (YYYYMM)’:

Here is how the report created from this data source would look like:

From the report above, we can once again conclude that, a date field’s type is not always the same as its display format. 

 

Note: Here I didn’t select the Date (YYYYMMDD) data type because our data set doesn’t contain the day information (DD). 

Using Incorrect absolute date type

Consider the following data set:

Here the field ‘order date’ contains date 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 (YYYYMM)’:

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

The data type ‘Date (YYYYMMDD)‘ tells data studio to expect year, month and day in the ‘order date’ fields in our data set.

Now since the day information is missing in our data set, what data studio will do is add the default day ‘1’ to all ‘order date’ fields in our data set when you create/refresh your report.

 

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

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

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

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

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

 

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

 

Absolute Time

Absolute time refers to a specific time which you can point to on a clock.

Following are examples of absolute time in the context of Google Data Studio:

  • Sept 10, 2019, 10 PM
  • Sept 10, 2019, 10:30 PM

 

Data types for Absolute time

These are the data types meant for absolute times.

Following are data types for absolute time:

  • Date Hour (YYYYMMDDhh)
  • Date Hour Minute (YYYYMMDDhhmm)

 

You should select that data type for your absolute time which matches with the time type in your data set. 

 

For example, consider the following data set:

Here the field ‘order date’ contains both date and time and is in the format: YYYY-MM-DD-HH

So when setting up the data source schema, we should set the data type of ‘Order Date’ field to ‘Date Hour (YYYYMMDDhh)’:

Here is how the report created from this data source would look like:

Note: We didn’t use the Date Hour Minute (YYYYMMDDhhmm) data type because the minute information is not available in our data set.

Consider the following data set:

Here the field ‘order date’ contains both date and time and is in the format: YYYY-MM-DD-HH-MM

Since the minute information is available in the data set, we should set the data type of ‘Order Date’ field to ‘Date Hour Minute (YYYYMMDDhhmm)’:

Here is how the report created from this data source would look like:

Using incorrect absolute time type

Consider the following data set:

Here the field ‘order date’ contains both date and time and is in the format: YYYY-MM-DD-HH

So when setting up the data source schema, we should set the data type of ‘Order Date’ field to ‘Date Hour (YYYYMMDDhh)’:

But what if we set the data type of ‘Order Date’ field to ‘Date Hour Minute (YYYYMMDDhhmm)’:

The data type ‘Date Hour Minute (YYYYMMDDhhmm)’ tells data studio to expect year, month, hour and minute data in the ‘order date’ fields in our data set.

 

Now since the minute information is missing in our data set, what data studio will do is add the default minute ‘0’ to all ‘order date’ fields in our data set when you create/refresh your report.

So when you create a report from the data source, it would look 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 set. Otherwise you would get incorrect/unexpected time data in your report.

For example, consider the following data set:

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

Now let’s set the data type of ‘Order Date’ field to ‘Date Hour Minute (YYYYMMDDhh)’:

The data type ‘Date Hour Minute (YYYYMMDDhhmm)’ tells data studio to expect year, month, hour and minute data in the ‘order date’ fields in our data set.

Now since the hour and minute information is missing in our data set, what data studio will do is add the default hour ‘12’ and default minute ‘0’ to all ‘order date’ fields in our data set when you create/refresh your report.

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

So when you create a report from the data source, 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 set. 

 

Relative Dates

Relative date is the date which does not refer to a specific date.

Following are examples of relative dates in the context of Google Data Studio:

  • 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.

Following are relative date types:

  • Quarter (1,2,3,4)
  • Month (MM)
  • ISO Week (ww)
  • Month Day (MMDD)
  • Day of Week (D)
  • Day of Month (DD)

 

You should select that data type for your relative date which matches with the date type in your data set. 

 

For example, consider the following data set:

Here the field ‘order date’ contains data that refers to a quarter of a year like: quarter 1, quarter 2, quarter 3 and quarter 4.

So when setting up the data source schema, we should set the data type of ‘Order Date’ field to ‘Quarter (1,2,3,4)’:

Here is how the report created from this data source would look like:

Consider another data set:

Here the field ‘order date’ contains data that refers to the days of the week: Monday, Tuesday, Wednesday etc

So when setting up the data source schema, we should set the data type of ‘Order Date’ field to ‘Day of Week (D)’:

Here is how the report created from this data source would look like:

Relative Time

Relative time is the time which does not refer to a specific point in time. 

Following are examples of relative time in the context of Google Data Studio:

  • 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:

  • Hour (hh)
  • Minute (mm)

 

You should select that data type for your relative time which matches with the time type in your data set. 

For example, consider the following data set:

Here the field ‘Order Time’ refers to the time of a day: 9 am, 10 am , 3 pm (15) and 8 pm (20).

So when setting up the data source schema, we should set the data type of ‘Order Time’ field to ‘Hour (hh)’:

 

Here is how the report created from this data source would look like:

Related Articles

 

Do you know the difference between Digital Analytics and Google Analytics?


99.99% of course creators themselves don’t know the difference between Digital analytics, Google Analytics (GA) and Google Tag Manager (GTM).

So they are teaching GA and GTM in the name of teaching Digital analytics.

They just copy each other. Monkey see, monkey do.

But Digital analytics is not about GA, GTM.

It is about analyzing and interpreting data, setting up goals, strategies and KPIs.

It’s about creating strategic roadmap for your business.


Digital Analytics is the core skill. Google Analytics is just a tool used to implement ‘Digital Analytics’.

You can also implement ‘Digital analytics’ via other tools like ‘adobe analytics’, ‘kissmetrics’ etc.

Using Google Analytics without the good understanding of ‘Digital analytics’ is like driving around in a car, in a big city without understanding the traffic rules and road signs.

You are either likely to end up somewhere other than your destination or you get involved in an accident.


You learn data analysis and interpretation from Digital analytics and not from Google Analytics.

The direction in which your analysis will move, will determine the direction in which your marketing campaigns and eventually your company will move to get the highest possible return on investment.

You get that direction from ‘Digital analytics’ and not from ‘Google Analytics’.


You learn to set up KPIs, strategies and measurement framework for your business from ‘Digital analytics’ and not from ‘Google Analytics’.

So if you are taking a course only on 'Google Analytics’, you are learning to use one of the tools of ‘Digital analytics’. You are not learning the ‘Digital analytics’ itself.

Since any person can learn to use Google Analytics in couple of weeks, you do no get any competitive advantage in the marketplace just by knowing GA.

You need to know lot more than GA in order to work in digital analytics and marketing field.


So what I have done, if you are interested, is I have put together a completely free training that will teach you exactly how I have been able to leverage digital analytics to generate floods of news sales and customers and how you can literally copy what I have done to get similar results.

Here what You'll Learn On This FREE Web Class!


1) The number 1 reason why most marketers and business owners are not able to scale their advertising and maximise sales.

2) Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

3) The number 1 reason why conversion optimization is not working for your business.

4) How to advertise on any marketing platform for FREE with an unlimited budget.

5) How to learn and master digital analytics 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 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 which 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 !!