Alteryx Designer Desktop Discussions

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

Tonumber(Datetimemonth) but need month & year

MikeFrancis1959
8 - Asteroid

Tonumber(Datetimemonth([Commit Date]))

This formula works good but I just ran across something that caused me an issue. If the month is Jan-23 it shows 1 but what about Jan-24, it shows one also , is there any way to distinguish the difference. Can I have the formula change somehow to have month & year, if so, I could not find the right syntax to use, can someone help me?

Thanks,

Mike 

1 REPLY 1
alisonpitt
11 - Bolide

This is a sticky question!! It depends on what you're going for. Personally, when I need to know just the year and month of something, I like DATETIMETRIM([Date], 'month') and then you can grab date parts later.

 

But to your specific question, DATETIMEMONTH() will only ever bring back the number of the month, regardless of year. You could do something that brings back year as well, and concatenate it, if you're aiming for a nice string output. I'll attach a couple examples.

datetimetrim.png

Labels