Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
We’re experiencing technical issues with our vendor that are affecting license activations for Designer Desktop. We don’t yet have an estimated resolution time. We apologize for the inconvenience and will share updates as we have them.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Extract hour from a datetime field

bdlee99
5 - Atom

Hello,

 

I need to extract the hour from a datetime field into a new column. The current format is YYYY-MM-DD HH:MM:SS.

 

Any help would be greatly appreciated!

2 REPLIES 2
Bob_Blackey
11 - Bolide

Hi,

 

Use a FORMULA tool, set the field type to String and set the formula to:

 

DateTimeFormat([YourField],"%H")     - where [YourField] is the field with the date time

 

Cheers,

Bob

 

gc
9 - Comet

Check this out >> https://help.alteryx.com/10.6/Reference/DateTimeFunctions.htm

"%H" in Formula tool to pull out the 2 digit hour.

Labels
Top Solution Authors