Hello,
I would like to insert the maximum value of the integer in the day of DMY2Date function but cannot seem to figure it out.
Example:
Month1 is an integer and it is 3 and i know the last value for the day is 31 since it is march, but i want it to "generate" the last day of each selected month.
So if I use Date1 and i only have the year and the month, i want to get the last day of the month:
Month1 := 3 year1 := 2023 //To get the last day of the selected month and year Date1 := DMY2Date(Maxvalue,Month1,Year1) //Date1 becomes equal to 31/3/2023
Sorry if the question makes no sense and I will be removing it if it makes no sense,
Thank you
Thank you a lot!
Hi,
You can try below method to get the last date of the month
LastDate := CALCDATE('CM',DMY2DATE(1,Month1,Year1)));
Thanks.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156