Hi
This might be a basic question for all of u, but i need help from you guys.
here is my query

select (sum(datediff(dd,DateAdmitted, DateDischarged))/count(*)) AS Avrvg
from table1
where DateDischarged is not null
this gives me the result as 4 in the column Avrvg. but the actual result should be 4.178082191. How can I display the value after the decimal point. Please help.
Thanks In advance.

Any update on this guys....

From the mysql help:

DATEDIFF() returns expr1 – expr2 expressed as a value in days from one date to the other. expr1 and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.