Herouth,
I am doing this:
psql tracker -qtc "select date_part('epoch', '$edate'::datetime);" > .arg1
psql tracker -qtc "select date_part('epoch', '$sdate'::datetime);" > .arg2
date1=`cat .arg1`;
date2=`cat .arg2`;
psql tracker -qtc "select ($date1 - $date2) / 60 / 60 / 24;"
to calculate intervals...this is census stuff.
How many Pt Days per bed, etc.
Is there a way/function that allows me to do simple date arithmetic,
ala, `SELECT $enddate - startdate;' ?
Cheers and thanks,
Tom
------- North Richmond Community Mental Health Center -------
Thomas Good MIS Coordinator
Vital Signs: tomg@ { admin | q8 } .nrnet.org Phone:
718-354-5528 Fax: 718-354-5056
/* Member: Computer Professionals For Social Responsibility */