Hi,
How can I say IF recPurchaseLine."Expected Receipt Date" 'IS NOT IN THE CURRENT CALANDER MONTH' THEN
ERROR();
*This post is locked for comments
Hi,
How can I say IF recPurchaseLine."Expected Receipt Date" 'IS NOT IN THE CURRENT CALANDER MONTH' THEN
ERROR();
*This post is locked for comments
AlexDen: hehe, that's a new one for me :-)
IF NOT (recPurchaseLine."Expected Receipt Date" IN [CALCDATE('<-CM>', TODAY)..CALCDATE('<CM>', TODAY)]) THEN ERROR('Incorrect date');
Hello lewishhh,
Try the below solution for your problem.
Here FindDate_gDat is a Variable of type Date.
IF DATE2DMY(FindDate_gDat,2) <> DATE2DMY(TODAY,2) THEN
ERROR('Date is not of this month');
Thanks
I can think of two options.
#1:
IF (DATE2DMY(recPurchaseLine."Expected Receipt Date", 3) <> DATE2DMY(TODAY, 3)) OR (DATE2DMY(recPurchaseLine."Expected Receipt Date", 2) <> DATE2DMY(TODAY, 2)) THEN ERROR('error message');
#2:
IF NOT ((CALCDATE('<-CM>', TODAY) <= recPurchaseLine."Expected Receipt Date") AND (CALCDATE('<CM>', TODAY) >= recPurchaseLine."Expected Receipt Date")) THEN ERROR('error message');
Maybe working with the Date-Table offers a third option :-)
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156