Hello out there in the jungle...
=)
I found out that i can calculate the dates e.g
$today = strftime('%Y%m% d',mktime(0, 0, 0, date("m"), date("d"),
date("Y")));
$yesterday = strftime('%Y%m% d',mktime(0, 0, 0, date("m"), date("d") - 1,
date("Y")));
$dayBeforeYeste rday = strftime('%Y%m% d',mktime(0, 0, 0, date("m"),
date("d") - 2, date("Y")));
$dayBeforeTheDa yBeforeYesterda y = strftime('%Y%m% d',mktime(0, 0, 0,
date("m"), date("d") - 2, date("Y")));
and so on........
This works even if we have the 1st of August $yesterday gives me the 31st
july.
Can I do this with times also??
e.g. Iit it now 17:06 an i want to make minus 20 min (like abopve minus 1
day) and I want the result to be 16:46.
I tried the above example, wit %H%M but it does not work?
Any ideas?
Thanks
:-X
=)
I found out that i can calculate the dates e.g
$today = strftime('%Y%m% d',mktime(0, 0, 0, date("m"), date("d"),
date("Y")));
$yesterday = strftime('%Y%m% d',mktime(0, 0, 0, date("m"), date("d") - 1,
date("Y")));
$dayBeforeYeste rday = strftime('%Y%m% d',mktime(0, 0, 0, date("m"),
date("d") - 2, date("Y")));
$dayBeforeTheDa yBeforeYesterda y = strftime('%Y%m% d',mktime(0, 0, 0,
date("m"), date("d") - 2, date("Y")));
and so on........
This works even if we have the 1st of August $yesterday gives me the 31st
july.
Can I do this with times also??
e.g. Iit it now 17:06 an i want to make minus 20 min (like abopve minus 1
day) and I want the result to be 16:46.
I tried the above example, wit %H%M but it does not work?
Any ideas?
Thanks
:-X
Comment