Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to trim year

haroon_sa
10 - Fireball

i'm unable to trim year from the date.

i'm having  1994-02-24

but i need this 1994(year alone) using formula tool.

 which formula should i use to get this output.

5 REPLIES 5
LordNeilLord
15 - Aurora

Hi @haroon_sa

 

Try DateTimeFormat([Your_Date_Field], "%Y")

 

@LordNeilLord

Part time Tableau, Part Time Alteryx. Full Time Awesome

 

 

 

BenMoss
ACE Emeritus
ACE Emeritus

You could also try left([date],4)

 

Ben

haroon_sa
10 - Fireball

No it's not working..... Any other idea

haroon_sa
10 - Fireball

Thanks @LordNeilLord 

I got it

LordNeilLord
15 - Aurora

@haroon_sa

 

This is a really good resource for DateTime Functions in Alteryx:

 

https://help.alteryx.com/9.5/Reference/DateTimeFunctions.htm

Labels
Top Solution Authors