Unix Technical Forum

Re: How to get the end value of month

This is a discussion on Re: How to get the end value of month within the Informix forums, part of the Database Server Software category; --> Thanks Obnoxio But for the month of december its getting bombed i am using the Below query for retrival ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 12:05 PM
Prateek Jain
 
Posts: n/a
Default Re: How to get the end value of month

Thanks Obnoxio

But for the month of december its getting bombed i am using the Below query
for retrival as i have to retrive result through query only
I tried case statement but thats not working

select day(date('01' || '/' || month(current)+ 1 || '/' ||year(current))- 1
units day) from product

CASE statement query

select day(date('01' || '/' ||
CASE
WHEN month(current) = 12 THEN "11"
WHEN month(current) < 12 THEN (month(current) + 1)
END CASE || '/' ||year(current))- 1 units day) from product


On 5/9/06, Obnoxio The Clown <obnoxio@serendipita.com> wrote:
>
>
> Prateek Jain said:
> > Hi,
> > I want to execute query for that i require end date of the month,
> >
> > suppose if the month is April then it should return 30
> > if March then in should return 31
> > Is there any inbuilt function for that which give the end date of the
> > month

>
> I don't think there is an inbuilt function, but you can work out (1st day
> of next month) - 1 easily enough.
>
> --
> Bye now,
> Obnoxio
>
> Information within this post contains forward looking statements within
> the meaning of Section 27A of the Securities Act of 1933 and Section 21B
> of the S E C Act of 1934. Statements that involve discussions with respect
> to projections of future events are not statements of historical fact and
> may be forward looking statements. Don't rely on them to make a decision.
>
> The poster is not a reporting company registered under the Exchange Act of
> 1934.
>
> I have received a life peerage from Her Majesty, who is not an officer,
> minister or affiliate Labour party member.
>
> I intend to recover my loan now, which could cause the parliamentary
> majority to go down, resulting in losses for you. Today's Labour party
> has: an accumulated deficit and a reliance on loans from officers and
> affiliates to pay expenses. It is not an operating political party. The
> party is going to need financing to continue as a going concern. A failure
> to finance could cause the party to go out of business. This report shall
> not be construed as any kind of investment advice or solicitation. You can
> lose all your money by investing in this party.
>




--
Regards,
Prateek Jain

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:39 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com