Alteryx Designer Desktop Discussions

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

Start date

novice1
8 - Asteroid

hi,

 

i am using formula took to return date for the start of the year and this gives me 

2020-01-01. how can i modify this formula so my year would start on 2020-04-01?

 

here is the formula i am using

 

DateTimeTrim(DateTimeToday(), "year")

6 REPLIES 6
MarqueeCrew
20 - Arcturus
20 - Arcturus

@novice1 ,

 

 let's try:

 

Left(DateTimeStart(),4) + "-04-01"

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
novice1
8 - Asteroid

Thank you

🙂

 

novice1
8 - Asteroid

do i just add 

"-year" to get result as 2019-04-01?

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

Hi @novice1 ,

 

 what's today's date?

 What was the date 1 year ago?

 What's the first 4 characters of that date?

 

left(datetimeadd(DateTimeStart(),-1,"year"),4)+"-04-01"

 

 my bad....

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
novice1
8 - Asteroid

i am rubbish t these formulas. Still cant get it to work. sorry

 

novice1_0-1605214313017.png

 

can just do some sort of if statement?

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

I edited my reply for left 4

Alteryx ACE & Top Community Contributor

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