Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

convert string "Wed Mar 02nd 2016 00:00:00" to a valid date

chvizda
8 - Asteroid

Hi all

I have a datasource where the datestring is in this format:

 

Tue Mar 01st 2016 00:00:00

Wed Mar 02nd 2016 00:00:00

Thu Mar 03rd 2016 00:00:00

Fri Mar 04th 2016 00:00:00

...

Could you please give me a tip how to convert it in a valid date format ?

 

Many thanks in advance 

Steffen

 

4 REPLIES 4
JordanB
Alteryx
Alteryx

Hi @chvizda

 

I have attached a workflow built in Alteryx 11.0 which details converting this to an Alteryx date format.

 

Hopefully this get's you along the right path, but I am sure others can contribute utilizing Alteryx's other more direct date time formulas options.

 

best,

 

Jordan barker

Solutions consultant 

Kanderson
10 - Fireball

This is solved but I like playing with dates. Wanted to post my solution.

JordanB
Alteryx
Alteryx

Less tools the better, nice work @Kanderson

 

Best,

 

Jordan Barker

Solutions Consultant

PaulN
Alteryx Alumni (Retired)

Hi @chvizda,

 

Just to complete other answers, in Alteryx 11.0, this could be done with a single DateTime tool.

 

The trick is to find the right custom format based on help.

 

Example:

Wed Mar 02nd 2016 00:00:00

 

Value Code Comment
Wed dy English day of the week as a 3-letter abbreviation. (On input full names are accepted, but Alteryx does not check that the day of the week agrees with the rest of the date.)
Mar Mon A three letter abbreviation of the English name of the month. (On input, full names are also accepted.)
02 dd Day of the month as digits with leading zeros for single digit days. (On input, leading zeros are optional.)
nd ** Wildcards to replace 2 random characters
2016 yyyy Year represented by the full four digits. (On input, two digits will also be accepted and mapped as done for the “yy” pattern.)

 

Kind regards,

 

Paul Noirel

Customer Support Engineer

Labels