Notifications
Announcements
No record found.
Hi,
If i want to say in the where condition the following:
Select table1 where table 1 is less than today's date by 2 months
How can i do that? Because each month might have different number of days
Or i shall do today's date - 30 and that's it?
What's the syntax?
I would utilize DateTimeUtil::addMonths(x, -2).
Try this,
DateTimeUtil::date (DateTimeUtil::addMonths (DateTimeUtil::newDateTime (asOfDate, 0), -2));
Hi Martin,
Is this correct? And would it give me what i'm looking for?
Table.CreatedDateTime < DateTimeUtil::AddMonths(DateTimeUtil:: getToday(DateTimeUtil::getUserPreferredTimeZone()),-2);
Hi Baharani,
I'm not sure why you used newDateTime and what is asOfDate?
Asofdate is the date which is like to provide in range like some date minus 2 months and it will the exact date value as a range. Here asofdate is simply a variable where you should give the date from where you want to go back to 2 months.
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 683 Most Valuable Professional
André Arnaud de Cal... 563 Super User 2025 Season 2
Sohaib Cheema 398 User Group Leader