Hi All,
I;m fairly new to alteryx and i'm trying to build a workflow . Is there a formulae which i can use to find the last date of previous month?
Thanks in advance and happy new year:)
Solved! Go to Solution.
Hi @Aravindc,
You need to use this formula:
DateTimeAdd(DateTimeFirstOfMonth(),-1,'days')
Datetimefirstofmonth() will provide you with the first day of the current month and the formula I have prepared will remove 1 day from this date.
I prepared the workflow for you.
Please mark as a solution if this was helpful!
Hi @Aravindc ,
There are many ways to achieve this, usually I like to play with an embedded function within Alteryx called Datetimetrim, which given the correct parameters will return you the last day of the month
I've mocked a workflow with two possible ways for you, I hope that's helpful
Regards,
Angelos
You can use DateTimeToday as well 🙂
DateTimeAdd(DateTimeTrim(DateTimeToday(),'FirstOfMonth'),-1,'day')
Hope this helps,
Regards,
Perfect solution, @messi007. Thanks a lot!
...and to cut the "time part" and keep just the "date part" (YYYY-MM-DD hh:mm:ss) it can be used "Left" function as it follows:
Left(DateTimeAdd(DateTimeTrim(DateTimeToday(),'FirstOfMonth'),-1,'day'),10)
Regards
User | Count |
---|---|
16 | |
14 | |
12 | |
6 | |
6 |