View previous topic :: View next topic |
Author |
Message |
John Corbin Beginner
Joined: 23 Jan 2004 Posts: 38 Topics: 21
|
Posted: Mon Aug 30, 2004 12:09 pm Post subject: Date formats |
|
|
I know TSO REXX has several DATE() functiosn but none of them return the date in the format of yymmdd ( closest I get I get is DATE('E') which returns the date in format yy/mm/dd.
Is there any way to get the format I want ? |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Mon Aug 30, 2004 1:04 pm Post subject: |
|
|
Date(S) will give you YYYYMMDD. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Mon Aug 30, 2004 1:08 pm Post subject: |
|
|
Also, if ISPF is available in the environment, you could concatenate the three ISPF date variables:
zyear = 04
zmonth = 08
zday = 04 |
|
Back to top |
|
 |
John Corbin Beginner
Joined: 23 Jan 2004 Posts: 38 Topics: 21
|
Posted: Mon Aug 30, 2004 1:10 pm Post subject: My attempt |
|
|
Thanks for the suggestions... here is a partial solution..
/* REXX */
TODAYSDATE=DATE('E')
RYEAR=SUBSTR(TODAYSDATE,1,2)
RMONTH=SUBSTR(TODAYSDATE,4,2)
RDAY=SUBSTR(TODAYSDATE,6,2)
/* REXX */
Now I have to join the 3 small strings into yymmdd.... |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Aug 30, 2004 1:34 pm Post subject: |
|
|
johncorbin,
You can simply code
Code: |
/* REXX */
TODAYSDATE=SUBSTR(DATE('S'),3,6)
SAY TODAYSDATE
|
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
John Corbin Beginner
Joined: 23 Jan 2004 Posts: 38 Topics: 21
|
Posted: Tue Aug 31, 2004 2:17 pm Post subject: Thanks for all the input |
|
|
Up and running now... Thanks..
Virtual beer for all |
|
Back to top |
|
 |
|
|