Hello! I am running a workflow over multiple months and am trying to determine the best way to always compare back to the last day of the month of the first month the file is ran.
Example - I need to run the workflow to validate data for the month of June 2022. When running the workflow in June, I would like to know if the dates in the database are equal to or less than the last day of the month of June. When I run for the first few weeks in July, I also need to compare back to the last day of the month of June 2022. I am wanting this to be dynamic so that few updates have to be made throughout the month. Appreciate any help!
This is the initial formula I considered but then realized when running it in the following month this will pull in lines we are not interested in until the end of that new month (July based on above example).
[Dates-Construction Start Date] <= DateTimeLastOfMonth()
Solved! Go to Solution.
Hello @alibeck89
If I understand this correctly, you want the end of month to be determined based on the Date construction Start Date.
If my understanding is correct, you can use the below:
todate(datetimetrim([Date-construction Start Date],"lastofmonth"))
This should return end of June regardless of whether you are running the WF in June or July as it's tied to the Date construction Start Date
Hi @christine_assaad appreciate you reaching out! For this I am actually trying to create a date that is the last day of the month so I can then compare that date to the Construction Start Date. Since The date created will be based off of the date in which the workflow is ran, this will not stay static for running into the next month. I believe I found a workaround for this in which I use the Date App and an Action to choose the last day of the month and then use that value to replace the date portion in my formula. It seems to be working quite well so fingers crossed it sticks! Thanks again :) Hope you have a great weekend!