Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / PHP / Database Access / June 2008



Tip: Looking for answers? Try searching our database.

date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sim - 12 Jun 2008 04:57 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.