Re: date function question

2007-06-12 Thread Baron Schwartz
There is also a LAST_DAY() function that returns the last day of the month: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html Peter Brawley wrote: > # of days since the first of the month from last month datediff(now(),date(concat(period_add(date_format(now(),'%Y%m'),-1),'01'

Re: date function question

2007-06-12 Thread Peter Brawley
> # 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 - Andr

date function question

2007-06-12 Thread Andrey Dmitriev
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 -- MySQL General Mai

Re: DATE function question

2003-03-26 Thread Serge Paquin
;s how it's listed in the manual. > > date_add([thedatefield],Interval 15 day) > > Mark > > -Original Message- > From: Serge Paquin [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 26, 2003 10:35 AM > To: [EMAIL PROTECTED] > Subject: Re: DATE function questio

RE: DATE function question

2003-03-26 Thread Mark Armendariz
5 AM To: [EMAIL PROTECTED] Subject: Re: DATE function question I believe the following will work: date_add([thedatefield],Interval 15 days) I am almost sure I got the syntax right off the top of my head. Check mysql.com for "date functions" if the above doesn't work. Serge. On

Re: DATE function question

2003-03-26 Thread Serge Paquin
I believe the following will work: date_add([thedatefield],Interval 15 days) I am almost sure I got the syntax right off the top of my head. Check mysql.com for "date functions" if the above doesn't work. Serge. On Wed, 26 Mar 2003 10:16:18 -0500 "Tom Ray" <[EMAIL PROTECTED]> wrote: > I hav

DATE function question

2003-03-26 Thread Tom Ray
I have a small question about the DATE function. This is what I want to do: - User enters information into form and submits it to database - When info is added to database the current date is stored ala 2003-03-26 - Now I want to take that date 2003-03-26 and tack on either 15 or 30 days on to it