Alteryx Designer Desktop Discussions

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

DATE TIME CONVERSION

Ballama6
6 - Meteoroid

Hello All,

 

I'm having a difficult time converting the timestamp below to the Alteryx date time format. 

 

"Thu Feb 28 13:33:46 UTC 2019" 

 

I tried using "dy month dd hh:mm:ss Z yyyy" in the Incoming String field of the DateTime tool, but it only produces nulls. The Example Output field shows the correct format though -  2019-02-28 13:33:46, so I'm not sure why it only produces nulls. 

 

Any help is greatly appreciated. 

 

Thank you,

 

Mark B. 

 

5 REPLIES 5
JosephSerpis
17 - Castor
17 - Castor

Hi @Ballama6 I mocked up a workflow let me know what you think?

 

Dates_141119.PNG

CJBioS
5 - Atom
I'm bringing in a date field from Excel, in the "07/19/2018" format, and it's a Vstring. I've tried using the DateTime tool, but it says it can't convert "11/01/2019" because the month is not within range 1-12. I used the function DateTimeFormat([Date],"%m/%d/%Y"), and it creates a Vstring date, but even using the ToDate function I can't convert it to a date.
 
I'd like to pull the month out.
I also want to get the week number.
And get the number of days between my dates and today's date.
 
I've tried using the Select Tool to convert to a date but it still gives me a can not convert error.
echuong1
Alteryx Alumni (Retired)

See attached for an example. I used the datetime tool to convert the string to a date format. Then I used the formula tool to derive the month, week, and difference values. Let me know if that works! 

CJBioS
5 - Atom

The datasets I am blending have different date formats- one is MM/dd/yyyy hh:mm:ss and the second is yyyy-MM-dd. I've had to use the Select tool to format them as String then use the Date tool to format them as dates in their respective format.  Then I used the Date tool to convert them back in to String with the same yyyy-MM-dd format for blending.

 

But my formulas to pull the Month, Week number, and difference in days I built individual for each data set. I couldn't get the formulas to work on the blended date field.

rrikkala
5 - Atom

@JosephSerpis Or Anyone here , 

can you guys help me converting '2021-11-24T13:55:50.930-0800' this to date and time format.

Labels