KNOWLEDGE BASE

NOW() Function Returns UTC Time


Published: 04 Mar 2013
Last Modified Date: 14 Jun 2016

Issue

Using the NOW() function in a calculated field returns UTC time.

Environment

  • Tableau Desktop
  • EMC Greenplum
  • PostgreSQL
  • Live connection

Resolution

Option 1:

Include the DATEADD() function in the calculated field formula to account for the time zone offset. For example, to convert UTC to PST (Pacific Standard Time) the formula for the calculated field is: DATEADD('hour', -8, NOW())

Option 2:

Use an extract. For more information, see Extract Your Data.
 

Cause

Live connections to Greenplum and PostgreSQL are designed to return UTC time due to inconsistencies in how these datasources handle datetime and time zone offsets.

 
Did this article resolve the issue?