DATE_FORMAT SQL Issue
Hi There,
I'm tyring to convert my date field from a 12 hour time stamp, to a 24 hour timestamp. I tried using DATE_FORMAT(`Date Field`, '%Y-%m-%d %H:%m:%s') but it gives me a completely different date AND time than what the actual value is.
Has anyone ever encountred a similar issue and have any advice. Thanks!
Comments
-
The documentation found in the Knowledge Base has always helped me when it comes to formating my dates/times: https://knowledge.domo.com/Visualize/Adding_Cards_to_Domo/KPI_Cards/Transforming_Data_Using_Beast_Mode/03Date_Format_Specifier_Characters_in_Beast_Mode
To convert to 24 hour try:
DATE_FORMAT('Date Field', '%T')
Let me know if this helps!
0 -
Thanks for your response! My issue is that when I use any of those functions, it completely changes the date. For example, the date 10/2/2019 8:14 PM becomes 2019-10-03 01:07:30 when using the funciton DATE_FORMAT(`Date Field`, '%Y-%m-%d %T'). Is there some sort of additional calculation I should be doing?
0 -
It must be something with the data type of the date. What data type does it say it is?
0
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
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 754 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