Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Statistics for comparison of two Date Fields 1

Status
Not open for further replies.

sbbrown9924

Technical User
Mar 7, 2003
80
US
I have an encounter database that logs all the important milestone times when a patient is seen in an ER. These times are TriageTime, InRoomTime, DischargeTime, etc.

How would I write a query that performs statistics (min, max, avg, stdev) on the DateDiff of two date fields in a table across all encounters?
 
You can add and subtract times like you would numbers. Totals queries allow you to perform Min, Max, Avg, and StDev.

SELECT Min(DateDiff("n",TriageTime, InRoomTime)) as MinTR,
StDev(DateDiff("n",TriageTime, InRoomTime)) as StdTR
From SomeTable;

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
dhookum;

my apologies, I think I forgot to thank you for the help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top