Hello,
In this Workflow attached below The End Date needs to be updated as such It will be the Last day of the Next month from current date. So for example If current date is 2021-12-17 then the End Date needs to be updated as 2022-01-31. So basically the year needs to be changed dynamically. Can anyone help me to update the Formula.
The workflow is attached below.
Solved! Go to Solution.
Maybe you can try
Datetimetrim(
DateTimeAdd(
DateTimeTrim([Current date],"firstofmonth")
,1,"month"),
"lastofmonth")
What this is gonna do is take your current date field and force it to the first of that month (so 2021-12-17 will become 2021-12-01). The you will add a month to that date, so 2021-12-01 will become 2022-01-01 and finally you will trim that to the end of the month, so 2022-01-31.
Hope that helps,
Angelos
@DataPirate26
We have a function "DateTimeTrim" can be used here.
@AngelosPachis
You are fast...😁
Thanks @Qiu 😅 I'm thinking of participating in the Grand Prix in the next Inspire conf.
Thank you for also helping me to realise that you probably don't need to trim it to the first of the month firstly ( I thought the formula wouldn't work for February for example)
@AngelosPachis
Wow, go for it. looking to see you in there and maybe get the champion!😁
This is super awesome. Thanx got to learn something New. I hope this will work fine for all the months right ?
@DataPirate26
Yes, it should be.
And it helps, apppreciate if if you would mark my and @AngelosPachis solution as accept.
@AngelosPachis @Qiu Thanx for a quick resolution.
Thanks @Qiu , really appreciate it!