Adjust for Daylight Saving Time
Tableau has this Knowledge Base article on how to adjust a
date field for Daylight Saving Time (DST). However, after further testing, I
found the formulas have some bugs.
Above are test scenarios for Daylight Saving Time
adjustments in America and Europe. The
Datetime ‘OLD’ column used the (incorrect) calculated field from the KB
article, whereas the Datetime ‘NEW & BETTER’ column used the
(correct) calculated field below. Notice
the datetimes with red dot are the ones with discrepancies in the time
adjustment.
Here’s the correct calculated field to adjust for DST in the
USA:
And here’s the correct calculated field to adjust for DST in
Europe:
No comments:
Post a Comment