Hi All, How to calculate days between two dates.. i am using oracle 10g + PHP.. if days is less then 20 our program will send mailt to respective team.. i need your help... Thanks Sam
sam it has nothing to with oracle its a simple php problem function dateDiff($dformat, $endDate, $beginDate) { $date_parts1=explode($dformat, $beginDate); $date_parts2=explode($dformat, $endDate); $start_date=gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]); $end_date=gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]); return $end_date - $start_date; } $date1="07/11/2003"; $date2="09/04/2004"; $dd=dateDiff("/", $date2, $date1); if ($dd<20) mail.... Regards Alex
Thanks Alex, but i want to take both date from Oracle 10g database table... let me know how to pass date1, date2 in function... Regards, Sam