Converting UTC to Central - Daylight Savings
Good morning,
One of the databases I pull data from into DOMO uses UTC, so, to get it to Central time (my time), in the ETL I just do
CONVERT_TZ((`HC_store_orders.created`), 'UTC','America/Chicago')
However, the tricky part is that it seems to convert to Chicago time based on what Chicago time is today, versus what it was at that time.
So in other words, right now I'm 6 hours behind UTC, but, in October, before we fell back due to DST, we were only 5 behind.
So instead of my HC_store_orders.created reading 10/22/2020 3:14 PM, it is reading 2:14 PM.
And since the fall back, jump forward days vary year to year, I can't think of any way around this.
This stemmed from wanting to find customers who placed a store order X amount of days after receiving an email. The Database is annoying because in this case the email sent date is in their DB as central time, but the store order table is in UTC.
So, the email was sent at 10/22/2020 at 3:04 PM, and the order was placed after at 3:14 PM, but due to above, it is showing the order came in before the email and therefore that email is not getting credit.
I'll probably just end up using date only for now, instead of time, but just thought I'd get others' thoughts/experiences
Answers
-
You might be able to hack it with something like what is outlined here: https://stackoverflow.com/questions/28876683/how-to-convert-a-timestamp-from-one-timezone-to-other I'm not certain of what database you use so your syntax may be different but the logic should work.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**3
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 627 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive