postgresql7.1 select 1 where to_date('$start_date(date)','YYYY-MM-DD HH24:MI:SS') > to_date('$end_date(date)', 'YYYY-MM-DD HH24:MI:SS')