You need to sign in to do that
Don't have an account?
Michael M
Date manipulation question
I need to do some date manipulation in Apex, as follows. I need to take today's date, get the 1st day of the month (so for today, 9/1/20), and I need to return 4 months from that date (in this case, 1/1/21).
So:
1. Get the first of THIS month
2. Get that date + 4 months
Is there a way to do this with apex?
I have some examples for you,
https://developer.salesforce.com/forums/?id=9060G000000BibSQAS
https://developer.salesforce.com/forums/?id=906F000000090RoIAI
https://stackoverflow.com/questions/9465900/how-do-we-get-the-first-and-last-day-of-the-current-month
https://developer.salesforce.com/forums/?id=906F0000000MN2wIAG
It will help your requirement.
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Thanks.
All Answers
I have some examples for you,
https://developer.salesforce.com/forums/?id=9060G000000BibSQAS
https://developer.salesforce.com/forums/?id=906F000000090RoIAI
https://stackoverflow.com/questions/9465900/how-do-we-get-the-first-and-last-day-of-the-current-month
https://developer.salesforce.com/forums/?id=906F0000000MN2wIAG
It will help your requirement.
I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.
Thanks.