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 Pallavi Phade as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 684 Super User 2025 Season 2
CA Neeraj Kumar 588
Martin Dráb 542 Most Valuable Professional