trouble with str_to_date in beastmode
I'm having complications formating an existing date column to my liking with the beastmode function.
The existing date column is currently formatted dd mmm yyyy hh:mm:ss AM or PM. This is in a table chart, the chart calendar is using the date column I just referenced, and is graphed by none. Right off the bat, it is weird to me that this date column in the data table (below the chart) displays in the format I just mentioned. However, in the graph itself, it is displayed as yyy-mm-dd hh:mm:ss.
Anyway, I want this column to display as mm/dd/yyyy (though the backslash, versus a hyphen or colon, is irrelevant) and I want it to be a date column, not a text or abc column.
The first thing I tried was Date_Format: date_format('column','%m,%d,%yyyy'). This results in an abc column and displays mm,dd,yyyy.
So I thought I need to string to date it. STR_TO_DATE((DATE_FORMAT(`column`,'%m,%d,%Y')),'%m,%d,%Y'). This results in a calendar column, but displays dd mmm yyyy instead of mm dd yyyy
I thought maybe my double formating command maybe was getting things all messed up so I tried STR_TO_DATE((DATE(`column`)),'%m,%d,%Y'). This just made everything go null.
I even tried a string to date of the concatination of the column broken down month column, day of month column, year column
I have done similar things with str to date and date_format and so on in the past with success, though it has been tricky in some cases. But I'm just not really sure where I'm going wrong on this one
Comments
-
Hi,
When I'm working and struggling to format dates this is my go-to document;
Let me know if this helps you,
Jarvis
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