Notifications
Announcements
No record found.
Hi all,
I want to validation if date expired.
I.e :- Date d = DatetimeUtil::date(DatetimeUtil::addDays(today (), 2));
Return: // 9/16/2022
If the date has 9/17/2022 then i want to validation.
If(d > today () ) // correct me if I'm wrong l.
{
}
Thanks
Hi waytod365,
Issue is not clear. Can you elaborate.
How you are getting 9/17/2022.
Is this a constant value?
Thanks,
Girish S.
Thanks for your reply Girish,
No, it's not constant value. I have a integer Field for that.
So if the date d values returns 9/17/2022, then you need a validation for that?
Yes! Date d = DatetimeUtil::date(DatetimeUtil::addDays(this.transDate), this.noOfCalDate));
NoOfCalDate right now = 2.
TransDate. = Today ().
Thanks for your attention.
Date d = DatetimeUtil::date(DatetimeUtil::addDays(this.transDate), this.noOfCalDate)); Date d1 = mkdate(17,9,2022) If(d == d1) { //add validations. }
If the date after adding number of days will be equal to 9/17/2022 then it will throw validation.
Thanks for your answer,
Actually, i have already transDate while creating form today date set.
NoOfCalDate in the setup form. ( I can give whatever number)
Etc:
If i set the NoOfCalDate 5 in the setup form.
USMF-00020 i created record today.
Same USMF-00020 records i will come after 5 days. In this case if i change anything that form. "Date already expired" i want to validation error message. Hope it's clear now.
I don't wanna check equal. I want to check if the date expired or not.
Date d = DatetimeUtil::date(DatetimeUtil::addDays(this.transDate), this.noOfCalDate)); Date d1= today(); // d less then d1 if(d < d1) { //date expired }
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.
Martin Dráb 592 Most Valuable Professional
André Arnaud de Cal... 478 Super User 2025 Season 2
BillurSamdancioglu 305 Most Valuable Professional