I have both date settings the same MM/DD/YYYY and the below code works when I use the set var command. May be the date input settings.
set var vdatea date = 03/01/2016 set var vdateb date = 03/05/2016 SET VAR bdate2 = (RDATE((IMON(.vdateb)),(IDAY(.vdateb)),(IYR(.vdateb))-1)) This gives me 03/05/2015 SET VAR sdate2 = (RDATE((IMON(.vdatea)),(IDAY(.vdatea)),(IYR(.vdatea))-1)) This gives me 03/01/2015 James Belisle Making Information Systems People Friendly Since 1990 [cid:[email protected]] From: [email protected] [mailto:[email protected]] On Behalf Of Kaleb Wade Sent: Saturday, March 05, 2016 3:33 PM To: Jim Belisle Subject: [RBASE-L] - RE: Help with RDATE function I tried this already and also using IYR4 instead of IYR with and without the dots infront of the variables. No combination has worked thus far. I'm thinking it may a misplaced parentheses in the year section. On Saturday, March 5, 2016, Jim Belisle <[email protected]<mailto:[email protected]>> wrote: Try putting a dot in front of the date variable in your equation. SET VAR bdate2 = (RDATE((IMON(.bdate)),(IDAY(.bdate)),(IYR(.bdate))-1)) SET VAR sdate2 = (RDATE((IMON(.sdate)),(IDAY(.sdate)),(IYR(.sdate))-1)) James Belisle Making Information Systems People Friendly Since 1990 [cid:[email protected]] From: [email protected]<javascript:;> [mailto:[email protected]<javascript:;>] On Behalf Of Kaleb Wade Sent: Saturday, March 05, 2016 2:52 PM To: Jim Belisle Subject: [RBASE-L] - Help with RDATE function I am trying to use the following for a user to provide a beginning date (bdate) and ending date (sdate) and a variable to be set for the same month and day, but for the prior year. I have exhausted every possibility I can come up with. Any help would be very much appreciated. My settings are: Date format: mm/dd/yyyy Date sequence: mm/dd/yy Using R:BASE X for Windows SET VAR bdate DATE SET VAR sdate DATE SET VAR bdate2 DATE SET VAR sdate2 DATE FILLIN bdate USING 'ENTER THE BEGINNING DATE :' FILLIN sdate USING 'ENTER THE ENDING DATE :' SET VAR bdate2 = (RDATE((IMON(bdate)),(IDAY(bdate)),(IYR(bdate))-1)) SET VAR sdate2 = (RDATE((IMON(sdate)),(IDAY(sdate)),(IYR(sdate))-1)) Kaleb Wade [email protected]<javascript:;><mailto:[email protected]<javascript:;>> -- Sent from Gmail Mobile

