Member-only story

Mastering Dates on Einstein Analytics using Epochs / Tableau CRM

Pedro Gagliardi
11 min readAug 7, 2019

--

I have seen a lot of questions lately about how to handle and work with dates on Einstein Analytics. Handling dates that are formatted as strings or using only the hour part of a timestamp or filtering data using dates.

This guide will help you address those scenarios using Epochs or the “Unix Time”.

What’s “Epoch” or “Unix Time”?

Citing Wikipedia:

In computing, an epoch is a date and time from which a computer measures system time. Most computer systems determine time as a number representing the seconds removed from particular arbitrary date and time. For instance, Unix and POSIX measure time as the number of seconds that have passed since 1 January 1970 00:00:00 UT, a point in time known as the Unix epoch.

All we need is in that definition but you can read more about it here: https://en.wikipedia.org/wiki/Epoch_(computing)

Why did I say all we need is in that definition? Well… The key to work with epoch is knowing the starting point: 1/1/1970. This is going to be your reference point to calculate everything.

The second thing we need is this:

1 hour = 3600 seconds
1 day = 86400 seconds
1 week = 604800 seconds
1 month (30.44 days) = 2629743 seconds
1 year (365.24 days) = 31556926 seconds

First use case: Transform a String to a Date.

--

--

Pedro Gagliardi
Pedro Gagliardi

Written by Pedro Gagliardi

Einstein Analytics geek since 2015… I know, it was called Wave back then!

Responses (2)