hi, i have a problem with a date, basically i pull out two dates from an sql database, e.g. 2001-07-12 and 2001-07-11 what i'm doing is a page that adds an amount onto a cost depending if you go and come back on the same day, it works with an if statement, if date a == dateb then overnight costs = 0
else
$1 = datea -dateb;
$2 = 195 * $1;
and this adds to the total.
the problem is that the dates don't take away from each other and there stuck in that format, any one have any ideas, all i get is $1 = 0
thanks Martin