Help please,
A friend from IT dept asked me a favor to write a short program using Visual FoxPro for changing internal date into year 1983 as a starting point. Then I wrote the following:
store day(date()) to myday
store month(date()) to mymonth
newyear = year(date()) - 16
newdate = alltrim(str(mymonth)) + "-" + alltrim(str(myday)) + ;
"-" + alltrim(str(newyear))
? "Current date is " + newdate + "."
! date newdate
Unfortunately, it wouldn't work and always ended up in "INVALID DATE".
I have tried to change the data type ("newdate") into Character, Numeric, Date but it still wouldn't work. Why?
Thanks in advance for your help.
Regards,
Indra Sofyar
[log in to unmask]
PCSOFT only works if you contribute. Send your messages
to be posted to: [log in to unmask]
|