Page 1 of 1

Date problem

Posted: Fri Sep 08, 2023 10:59 am
by CAsba
Hi, I want to add one year to the current date and display it.
I tried

Code: Select all

put the date into tDate
   convert tDate to dateItems
   add 1 to item 1 of tdate
   convert tdate to abbrev date
   put abbrev date into fld "date" 
but all I got was today's (unchanged) date.
Any ideas why it didn't add the year to the abbrev date - it added it to the tdate before converting to abbrev date.

Re: Date problem

Posted: Fri Sep 08, 2023 11:04 am
by Klaus
Hi CAsba,

the last line is the culprit!
"the abbr date" will give you AGAIN the current date, but you want the vonverted content of tDate:

Code: Select all

put the date into tDate
convert tDate to dateItems
add 1 to item 1 of tdate
convert tdate to abbrev date
## put abbrev date into fld "date"
put tDate into fld "date" 
Best

Klaus

Re: Date problem

Posted: Fri Sep 08, 2023 11:11 am
by CAsba
Many thanks Klaus !