View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 06:36 AM
Peter Brawley
 
Posts: n/a
Default Re: date function question

> # of days since the first of the month from last month
datediff(now(),date(concat(period_add(date_format( now(),'%Y%m'),-1),'01')))

> the # of days since the end of last month (e.g. from 5/31/07)

datediff(now(),date_sub(concat(date_format(now(),' %Y-%m-'),'01'),INTERVAL
1 DAY))

PB

-----

Andrey Dmitriev wrote:
> Can someone advise the best way to determine
> a) the # of days since the first of the month from last month (e.g. from
> 5/1/07)
> b) the # of days since the end of last month (e.g. from 5/31/07)
>
> Is there are a good way to determine the # of workdays in a month.
>
> Thanks,
> Andrey
>
>
>

Reply With Quote