in the Domo workbench, can't separate TransactionDate (date/time format) into 2 pieces

I have created a job in the Domo workbench with the following SQL query, but in my resulting dataset, "Transaction_Date" and "Transaction_Time" are not splitting into two columns, one with just the date (2021-09-02) and the other just the time (01:00:21.000)….I am still getting both (2021-09-02 01:00:21.000). I have also tried CONVERT with no success. Thanks in advance.
CONVERT(DATE, a.[TransactionDate]) AS Transaction_Date, CONVERT(TIME, a.[TransactionDate]) AS Transaction_Time
SELECT
a.[OrderNumber],
a.[ShipToNumber],
a.[LineNumber],
a.[TransactionType],
a.[TransactionNumber],
a.[TransactionDate],
CAST(a.[TransactionDate] AS DATE) AS Transaction_Date,
CAST(a.[TransactionDate] AS TIME) AS Transaction_Time,
a.[SequenceNumber],
a.[VendorNumber]
FROM [Marketing].[dbo].[Sales] a with (nolock)
Answers
-
dates and times are still represented as timestamps. If you really just want the text values you’ll need to convert it to a string but will lose the ability to do date operations
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Is there any other way to accomplish separating TransactionDate (date/time format) into 2 pieces in the workbench other than converting it to a string, I do need to be able to do date operations?
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 7 Cloud Amplifier
- 9 Federated
- 3K Transform
- 114 SQL DataFlows
- 654 Datasets
- 2.2K Magic ETL
- 4.1K Visualize
- 2.5K Charting
- 807 Beast Mode
- 80 App Studio
- 44 Variables
- 762 Automate
- 189 Apps
- 480 APIs & Domo Developer
- 75 Workflows
- 18 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 408 Distribute
- 119 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 47 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive