Loading

NOW() and TODAY() Functions Return Datetimes in Unexpected Time Zone

Дата публикации: Apr 30, 2026
Описание

Using the NOW() or TODAY() function in a calculated field, Tableau Desktop may return a time that appears to be in a different time zone. Similarly, when using a relative date filter, the anchor date may not match the user’s local time zone.

Cause

When using a live connection, Tableau Desktop sends the NOW() or TODAY() query to the underlying data source. The returned value depends on how the data source handles time and time zones.

If the data source is hosted in a different time zone, or configured to return timestamps in UTC, the result may differ from the local machine time.

For example, live connections to Redshift and PostgreSQL often return timestamps in UTC or based on the database session time zone. Tableau does not automatically adjust these values to the client machine’s local time zone.

Решение

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:

  1. Remove the date filter from the Filters shelf
  2. Select Analysis > Create Calculated Field
  3. 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() ) )

  4. Drag [Last 3 Days Filter] to the Filter shelf.
  5. In the Filter dialog, check True and click OK.

 

Дополнительные ресурсы

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.

Номер статьи базы знаний

001473588

 
Загрузка
Salesforce Help | Article