Separate Date from the text
I want to separate the Date from the text and put it in a new filed called "launch Date"
For eg: Suppose the text is "Email 2021-03-01 best practices in Email Marketing"
I want to separate out the "2021-03-01" text and put it in new filed called "launch Date". then I will update that filed datatype as a "Date"
Please suggest the code.
If you know that your text is always going to start with "Email somedate" then you can use the substring function to extract the date. In this example, you would do SUBSTRING(
textfield,7,10) to get the date. You could also wrap the STR_TO_DATE function around the substring function to format it in a particular way if you would like.
If the location of the date is going to vary in the text field, this will be much more difficult.**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
use regex to identify if a set of characters are formatted as a date.
then use INSTR or SUBSTRING to try to extract the set of characters
then use STR_TO_DATE to convert the extracted values to date.Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2
- 10.5K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 473 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 478 Datasets
- 208 Visualize
- 257 Beast Mode
- 2.1K Charting
- 12 Variables
- 85 Cards, Dashboards, Stories
- 18 Automate
- 355 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 247 Distribute
- 63 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 183 Product Ideas
- 1.2K Ideas Exchange
- 11 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive