Announcements
We have a Calculated Field with Data Type:Date and Time (let's call it Y) . The value is based on another Date and Time field (X) and it needs to be the last day of the next month. For example
X = 12.4.2021, i need Y=31.5.2021
Version 1612 (8.2.1.176) (DB 8.2.1.176) on-premises
Can we do that?
Hello, I recommend you to do something like this in JavaScript, this does not require any library:
var date = new Date();
var lastday = new Date(date.getFullYear(), date.getMonth() + 1, 0); // the + 1 in the month refers to the actual month, if you want the last day of the next month you must put + 2.
Thanks!
Community Support Team - Esteban
If this Post helps, then please consider Accept as solution to help the other members find it more quickly.
Hi,
If calculated field creation is not mandatory then
I would suggest to use some other business logic like Plugin, Script etc.
These approach will be easier one.
Thanks,
Pradeep.
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156