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!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Change Date Type Coming Out of Date Interface Tool to Match In-DB Field Date

estherb47
15 - Aurora
15 - Aurora

Hi,

 

I'm connecting to an Oracle DB, and I want to create a field that pulls just the year out of a datetime field.

 

So, I'd want 2017-01-02 to result in a value of 2017, which needs to be in integer format.

 

Thanks for your help!

5 REPLIES 5
MarqueeCrew
20 - Arcturus
20 - Arcturus

hi @estherb47,

 

Have you tried:

 

ToNumber(DateTimeFormat([DateTime_Field],"%Y"))

That just might work.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
estherb47
15 - Aurora
15 - Aurora
That looks like what I'd use in the regular formula tool. This is the In-DB
formula tool. Is it the same expression syntax?

--
Esther Bezborodko
*Manager*
201.650.7314 | estherbezborodko@gmail.com
beautycounter.com/estherbezborodko

*Our mission is to get safe products in the hands of everyone.*
[image: Facebook]
MarqueeCrew
20 - Arcturus
20 - Arcturus

@estherb47,

 

ok... how about:

 

EXTRACT(year FROM order_date)

i can webex with you now....

 

https://meetings.webex.com/collabs/meetings/join?uuid=M37I5AUGTGAAM8FCLXJK1FFVRX-UCSL&epwd=7e667c8e0...

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
estherb47
15 - Aurora
15 - Aurora

Can't WebEx on this because it's very sensitive data.

You solved it for me. Thank you!!! See you soon @ Inspire

MarqueeCrew
20 - Arcturus
20 - Arcturus

Yeah!  One more solve before Inspire.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors