Thanks all.
From: "Ken Shapiro" <kens...@optonline.net> To: <rbase-l@googlegroups.com> Date: Thu, 12 Jan 2023 20:25:48 -0500 Subject: RE: [RBASE-L] - Date Alternatively – accomplishes the same thing. SET VAR vdate DATE =(.#DATE) SET VAR vprevious_date date= (ADDMON (RDATE(IMON(.vdate),1,IYR4(.vdate)),-2)) Regards, Ken From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of Doug Hamilton Sent: Thursday, January 12, 2023 2:12 PM To: rbase-l@googlegroups.com Subject: Re: [RBASE-L] - Date Jan, try this: --vDate is a test date, try different values; change to .#Date in the expression after testing SET VAR vdate DATE = '2/28/2023' SET VAR vStartDate DATE = + (RDATE( (IMON( ADDMON(.vdate,-2))),1,(IYR(ADDMON(.vdate,-2))) )) SHOW VAR vstartdate RETURN Doug On 1/12/2023 12:27 PM, jan johansen wrote: 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 --- 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 rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/WC20230112182746.3000D7%40jjcalibrations.com. This email has been checked for viruses by Avast antivirus software. www.avast.com -- 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 rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/5967bf96-15ae-6114-3a01-83e4aa986d07%40wi.rr.com. -- 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 rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/000501d926ed%24f845f820%24e8d1e860%24%40optonline.net. -- 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 rbase-l+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/WC20230113141951.310001%40jjcalibrations.com.