From: Peter Brawley Date: June 12 2007 8:13pm Subject: Re: date function question List-Archive: http://lists.mysql.com/mysql/207436 Message-Id: <466EFE51.3040801@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > # 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 > > >