I cannot see a way to do this in the manuals, so I am trying to write some code to get it myself.
Here is what I have written so far, but it is not right, not at all:
/* rexx*/
EUdate = Date(european) /*todays date in eu format */
bdate = Date(base) /*base date, numerical format */
say 'base date is 'bdate /* display base date */
num = bdate+7 /* store value of base date plus 7 days */
say 'num is ' num /* display base date + 7 days */
days = bdate + Date('european','num', 'Standard') /* calculate date */
say 'todays date is 'EUdate /*show todays date */
say 'a week from this date will be 'days /* show date week from today */
exit
EUdate = Date(european) /*todays date in eu format */
bdate = Date(base) /*base date, numerical format */
say 'base date is 'bdate /* display base date */
num = bdate+7 /* store value of base date plus 7 days */
say 'num is ' num /* display base date + 7 days */
days = bdate + Date('european','num', 'Standard') /* calculate date */
say 'todays date is 'EUdate /*show todays date */
say 'a week from this date will be 'days /* show date week from today */
exit
The sources I used to write this code are:
http://www.oorexx.org/docs/rexxref/x23579.htm
and
http://nokix.sourceforge.net/help/learn_rexx/variable.htm
I think my issue on line 7 in my code, is that I am trying to use a variable (num) instead of a number such as 772345, and the function does not detect it is a variable. I was trying to concatenate my variable as a parameter to the date function but it did not work.
These are some of the things I tried:
days = bdate + Date('european','.num.', 'Standard') /* calculate date */
days = bdate + Date('european',num, 'Standard') /* calculate date */
days = bdate + Date('european',.num., 'Standard') /* calculate date */
Any assistance would be great. What I want to achieve is just displaying today's date and the date a week from today. Rexx is great but sometimes simple things seem difficult to do.
Thank you!