[futurebasic] Re: [FB] 2 Questions

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1999 : Group Archive : Group : All Groups

From: GBeckman@...
Date: Tue, 1 Jun 1999 01:20:44 EDT
I don't know what you are trying to do with your date string, but I devised a 
dirty way of making an app compliant from 1980 to 2079 and still use the 
mo/nn/yr format.  (the format works better for me cosmetically because of the 
length of the string)  I figure if anyone is still using one of my apps in 
2079 they need more than tech support.  (Of course that is what main frame 
guys were thinking in the 60s when they coded with two digit years)

I have not tested this as I translated it out of Pascal, but perhaps you can 
get some ideas.  The theory is to add the 19 or 20 to the two digit yr 
portion of the string and convert it to an integer.  I can then do any "what 
comes first" calculations from this new integer value.  You could do it just 
a easily working with the integer and adding 1900 and 2000.

IF VAL(YearStr$)>80 then YearStr$="19"+YearStr$ else YearStr$:="20"+YearStr$
year%=Val(YearStr$)

George