I am trying to use this function:
these variables are stored in datetime format of mysql.
var1:2012-02-01 01:39:32
var2:2012-02-02 01:47:11
PHP Code:
if (date('Ymd', $var1) == date('Ymd', $var2)
{
//True
}
Why does this output true every time?
Any other suggestions on how to do this? Please keep in mind I'm limited to doing this in PHP on this page without using any database. And I'm looking only for the same date not a 24Hour difference, however I don't care about differences in time zones as long as both variables reflect the same timezone.