Sean
Jan 17th, 2000, 01:30 AM
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 subtracting the number of months
and calculating 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 subtracting the number of months
and calculating the new date.
Any ideas appreciated. Thanks.
Sean.