[AccessD] OT: SQL SERVER DATEDIFF - DECIMAL PRECISION

Bert-Jan Brinkhuis thevigil at kabelfoon.nl
Wed May 26 04:14:53 CDT 2004


Paul,

how can there be 1.33 days between 2 dates?? I think this can only be a
whole numer? What does this function show in the immediate window?
Maybe you should try it with hours and calculate that to days?

HTH,

Bert-Jan

----- Original Message ----- 
From: "Millard, Paul --- Sr. Developer Analyst ---WGO"
<Paul.Millard at freight.fedex.com>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Sent: Wednesday, May 26, 2004 1:18 AM
Subject: [AccessD] OT: SQL SERVER DATEDIFF - DECIMAL PRECISION


> I'm looking to calculate the number of days between two days.  I got it to
run perfectly however I want to show one decimal precision.  The query
results shows 1.0 when in fact it is really 1.33.
>
> StartDate and ClosedDate are data types.
>
> select
> Avg(DATEDIFF(day, StartDate, ClosedDate)) AS TurnDays
> from
> tblPrCas
>
>
> Thanks,
> Paul
>
>
> **********************************************************
> This message contains information that is confidential
> and proprietary to FedEx Freight or its affiliates.
> It is intended only for the recipient named and for
> the express purpose(s) described therein.
> Any other use is prohibited.
> ****************************************************************
>
> -- 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com




More information about the AccessD mailing list