Sean
Jan 17th, 2000, 06:19 PM
Hi.
I'm trying to write an algoritm that will subtract a two digit number representing a number of months (ie 49, representing 4 years 1 month) from a string value in format MMYY (1201 representing a date December 2001). The result should return a string value representing a date in the MMYY format.
I have a version that works but don't like the way it is written and was wondering if anybody had any ideas.
My version gets the number of months since year 1 then subtracts the two digit number of months and calculates the new date.
Any ideas appreciated. Thanks.
Sean.
I'm trying to write an algoritm that will subtract a two digit number representing a number of months (ie 49, representing 4 years 1 month) from a string value in format MMYY (1201 representing a date December 2001). The result should return a string value representing a date in the MMYY format.
I have a version that works but don't like the way it is written and was wondering if anybody had any ideas.
My version gets the number of months since year 1 then subtracts the two digit number of months and calculates the new date.
Any ideas appreciated. Thanks.
Sean.