This, if I read it correctly, give you a rolling century ending five years forward from now. That should work for you.
--- Marc <[EMAIL PROTECTED]> wrote: > I found it. This is the code I got off the list years ago. > I think it will solve my problem? > > --SETCENT.CMD > > SET VAR vpadyears INTEGER = 5 > > -- SET DATE MM/DD/YYYY -- so you can capture the 4 digit year > -- SET VAR vYear INT = (IYR(.#DATE) - 100 + .vPadYears) > -- SET DATE MM/DD/YY > SET VAR vyear INTEGER = (INT(FORMAT(.#DATE,'YYYY')) -100 + .vpadyears) > > SET DATE FOR MM/DD/YYYY > SET DATE SEQ mmddyy > > SET VAR vcentury INTEGER = (INT(.vyear / 100)) > SET VAR vyear = (.vyear - (.vcentury * 100)) > > SET DATE CENTURY .vcentury > SET DATE YEAR .vyear > RETURN > > > Marc > > > > > ----- Original Message ----- > From: "Albert Berry" <[EMAIL PROTECTED]> > To: "RBG7-L Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, December 17, 2004 10:35 AM > Subject: [RBG7-L] - Re: Dates > > > > Marc, the date year setting is the first year of a century of dates, > allowing you to use two digit > > dates without confusing the system. The settings below will give you the > years 1905 through 2004, > > which is not what I think you probably need. > > > > Try: > > > > SET DATE FORMAT 'MM/DD/YYYY' > > SET DATE SEQUENCE MMDDYY > > SET DATE YEAR 80 > > SET DATE CENTURY 19 > > > > That will give you 1980 - 2079 > > > > > > --- Marc <[EMAIL PROTECTED]> wrote: > > > > > I have been using the code below for dates but somewhere > > > I remember seeing some code that allowed the year to float. > > > > > > Does anyone remember that or have a better suggestion? > > > > > > SET DATE FORMAT 'mm/dd/yyyy' > > > SET DATE SEQUENCE mmddyy > > > SET DATE YEAR 5 > > > SET DATE CENTURY 19 > > > > > > Thanks > > > Marc > > > > > > > > > > > > ===== > > Albert Berry > > Management Consultant > > RR2 - 1252 Ponderosa Drive > > Sparwood BC, V0B 2G2 > > Canada > > (250) 425-5806 > > (250) 425-7259 > > (708) 575-3952 (fax) > > [EMAIL PROTECTED] > > > > > > ===== Albert Berry Management Consultant RR2 - 1252 Ponderosa Drive Sparwood BC, V0B 2G2 Canada (250) 425-5806 (250) 425-7259 (708) 575-3952 (fax) [EMAIL PROTECTED]
