View previous topic :: View next topic
|
Author |
Message |
Arasi
New User
Joined: 15 Jul 2009 Posts: 6 Location: India
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
Arasi
New User
Joined: 15 Jul 2009 Posts: 6 Location: India
|
|
|
|
Thank you Aaru. So I will go for select statement. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
REread the rexx manual about the DATE function
manuals link at the top of the page |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Enrico,
I think, DATE fucntion can only be used for retrieving the system date.
Correct me if I am wrong. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Correct me if I am wrong. |
Naah... correcting is not enough, gimme some time to think and I' ll post the proper punishment
Rexx DATE is pretty smart, the syntax is
result = DATE(output_date_format[,input_date[,input_date_format]]) |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Enrico,
Quote: |
Naah... correcting is not enough, gimme some time to think and I' ll post the proper punishment |
Hmm.. I deserve it
Thanks a lot for the information. |
|
Back to top |
|
|
|