We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Cannot convert a string to a date format

ivoiculescu2020
8 - Asteroid

Dear team,

I need your help again: I need to convert a string field to a date with this format: dd-mmm-yyyy

I used the DateTime to convert the string to date/time format but it shows Null

I chose custom: dd-Mon-yyyy but nothing happens.

Please help!

Thank you,

Ioana

 

5 REPLIES 5
Luke_C
17 - Castor
17 - Castor

Hi @ivoiculescu2020 

 

Give this a go:

 

  1. First you need to parse the date into an actual date (in Alteryx, the format is yyyy-mm-dd).
  2. Then you can format to your requirement

Here's a great page on working with dates: DateTime Functions | Alteryx Help

 

datetimeformat(datetimeparse([completedTime],'%a, %B %d, %Y'),'%d-%b-%Y')

 

Luke_C_0-1647881530836.png

 

Alteryx_AR
12 - Quasar

@ivoiculescu2020  Same as @Luke_C . 

 

ArtiRajput_0-1647895725659.png

 

binuacs
21 - Polaris
ivoiculescu2020
8 - Asteroid

@binuacs @Alteryx_AR @Luke_C Thank you so much for your help! your solutions worked and I appreciate your prompt help!

Alteryx_AR
12 - Quasar

Hey @ivoiculescu2020  Thanks for accepting as solution :)

Labels
Top Solution Authors