How to separate a date and time field into two separate fields of date and time
Comments
-
Hi there!
You can do this using two separate beast modes.
For the date, you can use this:
DATE_FORMAT(`Date`,'%Y-%m-%d')
For the time you have a couple options:
This will give you the 12 hour time with seconds, followed by AM or PM:
DATE_FORMAT(`Date`,'%r')
This one will just give you the 12 hour time without seconds with AM or PM:
(will match closest what you asked for)
DATE_FORMAT(`Date`,'%l:%i %p')
Let me know if these work for you!
**Say 'Thanks' by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as 'Accepted Solution'0 -
I would like to follow up on this question as well. How do I take a DateHourMin field and seperate it into Date then Hour and Min. For instance:
DateHourMin
| 201907031605 |
Into:
Date HourMin
| 07-03-2019 | |16:05 |I tried the Beast Mode calc above and didn't have any luck.
0 -
@StarbucksLover you should be able to do it by using an ETL and setting the column type, there is an option for Date and a method for extracting time. This knowledge base article it kind of similar https://knowledge.domo.com/Prepare/DataFlow_Tips_and_Tricks/Adding_and_Subtracting_Hours_in_ETL
**If this answer solved your problem be sure to like it and accept it as a solution!
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
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 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