In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

How to convert string date (YYYY-MMM) to date (yyyy-mm-dd) IN -DB

blitz45
8 - Asteroid

I am having trouble converting string (2023-OCT) to date format (2023-10-01) IN-DB. Any suggestions or help is appreciated! 

 

Thank You,

5 REPLIES 5
Watermark
12 - Quasar
12 - Quasar

Is there some necessary reason to do it  IN-DB ?  Can you just do necessary operations IN-DB then convert outside of IN-DB?

ArtApa
Alteryx
Alteryx

Hi @blitz45 - Here is an example of how you can do this:

 

ArtApa_1-1681367928592.png

 

EdwardCochrane
7 - Meteor

You can use the 'DateTime' tool.

 

Set you incoming date as a string and select 'string to date/time format' at the top if the tool configuration.

 

Configure the rest of the tool.

 

This will create a new column so you will need to use a select tool to eliminate the original format column if that is what you want.

 

I use this to convert MMM-dd-yyyy to YYYY-MM-DD.

 

EDIT: I did not see that this was In-DB. The above is not applicable here.

DataNath
17 - Castor
17 - Castor

@EdwardCochrane this is an IN-DB request so would require the In-database tools, unless they stream data into Alteryx, at which point they could use standard tools. There's no IN-DB DateTime tool so they would need to use a Formula, with SQL syntax, as @ArtApa has demonstrated!

EdwardCochrane
7 - Meteor

Ah, I missed that bit. Thanks.

Labels
Top Solution Authors