Hi, Jan: Check out the ADDMON and ADDYR functions. You can use negative values for the second argument.
Here's an example: set var vdate = (ADDMON(.#DATE,-2)) SHOW VAR VDATE 11/12/2022 Or going forward in time: set var vdate = (ADDMON(.#DATE,2)) show var vdate 03/12/2023 Hope that helps. [cid:[email protected]] MIKE RAMSOUR Senior Quality Engineer p 740.829.4340 m 740.502.1659 [email protected]<mailto:[email protected]> CLEVELAND-CLIFFS INC. Coshocton Works 17400 State Route 16, Coshocton, OH 43812 p 740.829.3000 clevelandcliffs.com From: [email protected] <[email protected]> On Behalf Of jan johansen Sent: Thursday, January 12, 2023 1:28 PM To: [email protected] Subject: [EXTERNAL] [RBASE-L] - Date All, I'm having a brain cramp. My code doesn't handle crossing years apparently. I need to set a start date that is the first of the 2 months ago based on today i.e. 11/1/2022 Thanks Jan -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php<https://urldefense.com/v3/__http:/www.rbase.com/support/usersgroup_guidelines.php__;!!NemJCKdLgw!KtKMLVpirhMfaHlN0oii35CwRWURmNkUKTSvZgp7T5xQxysrmohpY9tE6g6lkzhupzZJbfWKF8O---riIs9RpcvCp_hy$> --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/WC20230112182746.3000D7%40jjcalibrations.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/rbase-l/WC20230112182746.3000D7*40jjcalibrations.com?utm_medium=email&utm_source=footer__;JQ!!NemJCKdLgw!KtKMLVpirhMfaHlN0oii35CwRWURmNkUKTSvZgp7T5xQxysrmohpY9tE6g6lkzhupzZJbfWKF8O---riIs9RpV0iGZ8U$>. ______________________________________________________________________________________________________ This electronic message and any attachments included with this message are for the exclusive use of the individual or entity to which it is intended to be addressed. This message may contain information that is privileged or confidential and thereby exempt and protected from unauthorized disclosure under applicable law. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, be aware that any disclosure, dissemination, distribution or copying of this communication, or the use of its contents, is not authorized and is strictly prohibited. If you have received this communication and are not the intended recipient, please notify the sender immediately and permanently delete the original message from your e-mail system. ______________________________________________________________________________________________________ -- For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php --- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/DM6PR04MB54365F500D41064522E5639D9FFD9%40DM6PR04MB5436.namprd04.prod.outlook.com.

