Author |
Message
|
my_mqmb |
Posted: Sun Jan 01, 2012 11:41 pm Post subject: ESQL function available for ..... ? |
|
|
Voyager
Joined: 08 Jun 2011 Posts: 84
|
is there any function in ESQL which returns the last day of the month ??
if it is 28, 29 , 30 or 31 ??
another question is :
How do we use ISLEAPYEAR function ? |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Jan 02, 2012 12:54 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
As described in the InforCentre, ISLEAPYEAR is a BOOLEAN (true or False) clause on the EXTRACT function.
What options have you tried?
As regards the days in month, once you have the month (via the extract function) it is no more than a simple bit of ESQL to do it for you but you have already thought of that otherwise you would not have thought about the ISLEAPYEAR clause.
I remember learning the rules as a child with something like this.
Quote: |
30 days hath September, April, jone and November
All the rest have 31 except February which has 28
unless it is a leap year
|
Yeah, I know it is not completely correct but in the late 1950's who even cared that 2000 was not a leap year?
What have you tried that is not working? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
my_mqmb |
Posted: Mon Jan 02, 2012 2:27 am Post subject: |
|
|
Voyager
Joined: 08 Jun 2011 Posts: 84
|
yes i have tried that already but i was thinking if there is a function like in java .. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jan 02, 2012 3:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
my_mqmb wrote: |
yes i have tried that already but i was thinking if there is a function like in java .. |
IF there is such a function, it is described in the Information Center.
If the Information Centre does not describe such a function, you can easily write one. |
|
Back to top |
|
 |
my_mqmb |
Posted: Mon Jan 02, 2012 3:52 am Post subject: |
|
|
Voyager
Joined: 08 Jun 2011 Posts: 84
|
IF EXTRACT ( ISLEAPYEAR FROM dateleapornot )IS TRUE
yes , i wrote it myself , just wanted to check if it existed ..
thnx guys |
|
Back to top |
|
 |
deepak_paul |
Posted: Tue Jan 03, 2012 2:32 pm Post subject: |
|
|
Centurion
Joined: 04 Oct 2008 Posts: 147 Location: US
|
mqjeff wrote: |
my_mqmb wrote: |
yes i have tried that already but i was thinking if there is a function like in java .. |
IF there is such a function, it is described in the Information Center.
If the Information Centre does not describe such a function, you can easily write one. |
And, you can do one more thing.
You can let Hursley folks know about this to check to see if they can create and include this as a built-in function in the next release of the Broker. _________________ Regards
Paul |
|
Back to top |
|
 |
|