Mysql - datetime and date-range comparsion
Posted
by Ockonal
on Stack Overflow
See other posts from Stack Overflow
or by Ockonal
Published on 2010-04-27T15:25:04Z
Indexed on
2010/04/27
15:33 UTC
Read the original article
Hit count: 221
Hello guys, I have datetime-row in mysql database. I have to check time between now and that date using php. If the range is bigger then 1 month - do somtething.
I tried something like this:
$dateFromMysql = strtotime($rowData);
$currentDate = date("m/d/y g:i A");
And then comparsion by hands. It's ugly.
© Stack Overflow or respective owner