Jump to content

calculating date


alin19

Recommended Posts

It won't be long before he realises d.m.y is as useless as a chocolate teapot when used as a db date format.

 

And if the number of days is a variable

 

$sql = "INSERT INTO tablename (datecol) VALUES (CURDATE() + INTERVAL $days DAY)";

Link to comment
https://forums.phpfreaks.com/topic/96982-calculating-date/#findComment-496313
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.