Loading

NOW() and TODAY() Functions Return Date Times in Unexpected Time Zone When Run Flow Tableau Prep Command Line

Date de publication: Apr 24, 2025
Description

Using NOW() or TODAY() functions in a calculated field, expected date time is displayed to Tableau Prep Builder GUI but different one is included in the output file after running the same flow by command line (CLI).

Cause

On Tableau Prep Builder GUI, NOW() and TODAY() use the system timezone of the machine which Tableau Prep Builder installed in.
Tableau Prep Builder CLI refers the system timezone of the machine which the data source is hosted. The behavior is by design.
Résolution
To modify the output result of the command line, use a calculation with the DATEADD() function to account for the time zone offset. To convert UTC to PST (Pacific Standard Time), the calculation formula including NOW() could become:
DATEADD('hour', -8, NOW())
Numéro d’article de la base de connaissances

001534687

 
Chargement
Salesforce Help | Article