hi how can i add integer to date field
i have table like
field type use
name varchar(25) name of tool
lcd type not defined but i stored date in this field last
calibratioon date
period int(5) period in
month
i want to serch record lcd+period <=now()
please help
J.O. Aho - 12 Jun 2008 05:59 GMT
> hi how can i add integer to date field
> i have table like
[quoted text clipped - 8 lines]
> i want to serch record lcd+period <=now()
> please help
You can use PERIOD_ADD to add months to your date, you may need to use
DATE_FORMAT to convert the lcd value to what the first function requires.
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

Signature
//Aho
Captain Paralytic - 12 Jun 2008 10:19 GMT
> hi how can i add integer to date field
> i have table like
[quoted text clipped - 8 lines]
> i want to serch record lcd+period <=now()
> please help
Sheesh, are you stupid or just lazy.
In answering your last thread called "date", I sent you to the manual
page that contained the date functions.
Can you really not manage to read the rest of the sodding page?