Re: Date function

Re: Date function

 

  

I am sorry

Try this
Select dateadd(ms, -3, DATEADD(mm, DATEDIFF(mm, 0, getdate())+1, 0))

Rohini

----- Original Message -----
From: "Rohini S Kumar "
<db2udbdba-ezmlmshield-x2548435.[Email address protected]
To: "LazyDBA Discussion" <[Email address protected]
Sent: Friday, October 27, 2006 3:30 PM
Subject: Re: Date function


> In MSSQL
>
> Select dateadd(ms, -3, DATEADD(yy, DATEDIFF(m, 0, getdate())+1, 0))
>
> will return you last day of current month. With this idea you can try for
> DB2
>
> Rohini
> ----- Original Message -----
> From: "KAMAL " <db2udbdba-ezmlmshield-x43068854.[Email address protected]
> To: "LazyDBA Discussion" <[Email address protected]
> Sent: Friday, October 27, 2006 2:33 PM
> Subject: Date function
>
>
>>
>> Hi All,
>>
>> How to get a maximum days from a month?
>> For ex: days of january 2003 we get result 31
>>
>>
>> Thanks in advance,
>> Kamal.
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
>> To post a dba job: http://jobs.lazydba.com
>> To Subscribe : http://www.LazyDBA.com
>> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>>
>>
>
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> To post a dba job: http://jobs.lazydba.com
> To Subscribe : http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>


DB2 & UDB email list listserv db2-l LazyDBA home page