Notifications
Announcements
i have two dates (vendtrans.TransDate == vendSettlement.TransDate) now i want to ensure if vendSettlement.TransDate date is within 180 days from vendtrans.TransDate how to do it
Hi SachinMittal,
You need to subtract and vendSettlement.TransDate - To get the date difference.
int nosOfDays; nosOfDays = vendtrans.TransDate - vendSettlement.TransDate; if(nosOfDays > 180) { //do something }
Thanks,
Girish S.
Hi Sachin, As Girish mentioned, you can subtract the dates to get the difference and no conversion is required.
Check this thread
community.dynamics.com/.../how-to-calculate-the-number-of-days-in-two-date-and-apply-the-updaterecordset
Sorry I am not clear with your question.
I think you need to check whether vendTrans.TransDate is within 180 days from vendSettlement.TransDate.
So you can directly add dates like below.
vendTrans.TransDate + 180;
It will add 180 days to date value.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 763 Super User 2025 Season 2
André Arnaud de Cal... 413 Super User 2025 Season 2
Martin Dráb 284 Most Valuable Professional