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'
> # 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
;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
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
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
This should work :
$SQL = "INSERT INTO orders (Customer_Id, Order_Date)".
"VALUES($CustID,Now())";
Xavier
-Message d'origine-
De : Alia Mikati [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi 19 avril 2002 11:28
À : [EMAIL PROTECTED]
Objet : Date function
Hello
I
I never saw the function "date()", to insert current date use:
CURRENT_DATE();
regards,
Jan
- Original Message -
From: "Alia Mikati" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 19, 2002 11:27 AM
Subject: Date function
> Hello
> I have the following SQL and I wanna