[EpiData-list] Bed occupancy - problems with date calculation...

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Sat Oct 29 20:07:15 CDT 2005

I am trying to write a PGM in order to calculate the bed occupancy in a 
defined period of time.
As dates can be converted to sequential integer numbers, I wrote the 
following, considering DATEADM (admission date), DATEDIS (discharge date) 
and AGE as database variables:

* ----------------------------------------
DEFINE DATEMIN <dd/mm/yyyy>
DEFINE DATEMAX <dd/mm/yyyy>

LET DATEMIN = ? First date : ?
LET DATEMAX = ? Second date : ?

After typing first date: 15/10/2005 (even "15/10/2005"), I get the error 
message: "Data type mismatch".
If I type 15102005, I get "Invalid date", what sounds reasonable.
But I can only entry the desired date when I type 75162, what is NOT the 
respective sequential number of days since 31/12/1899 ("EpiData handles 
dates as float-type numbers counting the number of days since 31/12/1899" 
as can be read in EpiData Help)

What am I doing wrong?
Thank you in advance.


Dr. MARCO Antonio MOURA Reis, MD, PhD
Discipline of Medical Informatics
Department of Medicine
University of Region of Joinville - UNIVILLE
Joinville (SC) - BRAZIL

E-mail: mmoura at infomedica.com.br

More information about the EpiData-list mailing list