Last Modified Date: 24 Aug 2022
Environment
- Tableau Desktop
- PostgreSQL
- Tableau Server Repository (PostgreSQL database)
- Amazon Redshift
- Live connection to data source hosted on machine in different time zone
Resolution
Option 1:
Use an extract. For more information, see Extract Your Data.
Option 2:
Use a calculation with the DATEADD() function to account for the time zone offset.
Example 1:
- To convert UTC to PST (Pacific Standard Time), the formula: NOW()
- Could become: DATEADD('hour', -8, NOW())
Note: During daylight savings time the time difference between UTC and PDT will be -7 hours.
Example 2:
To convert UTC to PST (Pacific Standard Time) for a relative date filter:
- Remove the date filter from the Filters shelf
- Select Analysis > Create Calculated Field
- In the Calculated Field dialog box that opens, do the following, and then click OK:
- Name the calculated field. In this example, the calculated field is named "Last 3 Days Filter"
- In the formula field, create a calculation similar to the following:
[Date Field] >= DATEADD('day', -3, DATEADD( 'hour', -8, TODAY() ) )
- Drag [Last 3 Days Filter] to the Filter shelf.
- In the Filter dialog, check True and click OK.
Cause
When connecting live, Tableau Desktop queries the datasource for NOW() or TODAY(). If the data source is hosted on a machine in a different time zone, then the data source may return the time in that time zone.Live connections to Redshift and PostgreSQL are designed to return UTC time due to inconsistencies in how these datasources handle datetime and time zone offsets.
Additional Information
To voice your support for the inclusion of this enhancement in a future product release, add your vote to the following Community Idea: Timezone conversion support.
Discuss this article... Feedback Forum
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials