This topic is locked

datediff() in event

3/4/2008 10:44:55 AM
PHPRunner General questions
V
vytb author

Hello,
I would like to attribute a value to a field depending on datediff of two dates. However I get cal to undefined function. How to use datediff() in events?
for ex.
if (datediff(date2,date1)>100)

$data['c']=1

else

$data['c']=0

J
Jane 3/5/2008

Vitas,
there is no datadiff PHP function.

Use strtotime function to find Unix time stamp and calculate difference between these time stamps.