Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To find the month of a date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Arasi

New User


Joined: 15 Jul 2009
Posts: 6
Location: India

PostPosted: Wed Jul 15, 2009 11:14 am    Post subject: To find the month of a date
Reply with quote

Hi all,
Is there any way to find the month of any date.
The Date('Month') gives only the month of current date.
I would like to get the month of any date (eg: 06/15/2009) in the MON format (JUN).

Thanks in advance!
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jul 15, 2009 11:37 am    Post subject: Reply to: To find the month of a date
Reply with quote

Arasi,

Hi and Welcome to the forums

Quote:
I would like to get the month of any date (eg: 06/15/2009) in the MON format (JUN).


I don't think if there is any in-built function for what you had asked for.

You can PARSE the month , check the value and then display the corresponding MONTH. All you have to do is 12 checks (IF ELSE).
Back to top
View user's profile Send private message
Arasi

New User


Joined: 15 Jul 2009
Posts: 6
Location: India

PostPosted: Wed Jul 15, 2009 11:41 am    Post subject:
Reply with quote

Thank you Aaru. So I will go for select statement.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Jul 15, 2009 12:04 pm    Post subject: Reply to: To find the month of a date
Reply with quote

REread the rexx manual about the DATE function

manuals link at the top of the page
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jul 15, 2009 12:32 pm    Post subject: Reply to: To find the month of a date
Reply with quote

Enrico,

I think, DATE fucntion can only be used for retrieving the system date.

Correct me if I am wrong.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Jul 15, 2009 12:52 pm    Post subject: Reply to: To find the month of a date
Reply with quote

Quote:
Correct me if I am wrong.

Naah... correcting is not enough, gimme some time to think and I' ll post the proper punishment icon_biggrin.gif

Rexx DATE is pretty smart, the syntax is
result = DATE(output_date_format[,input_date[,input_date_format]])
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jul 15, 2009 3:24 pm    Post subject: Reply to: To find the month of a date
Reply with quote

Enrico,

Quote:
Naah... correcting is not enough, gimme some time to think and I' ll post the proper punishment


Hmm.. I deserve it icon_sad.gif

Thanks a lot for the information.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reg:Displaying the particular month o... bhavana yalavarthi All Other Mainframe Topics 4 Sat Jul 08, 2017 8:13 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us