Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datediff help
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01351543
Message ID:
01351547
Vues:
24
Kirk,

cast( datediff( mi, start, end ) / 60.0 as int ) as hours, cast( datediff( mi, start, end ) % 60 as int ) as minutes

>I need to return two values based off an elasped time. The first value (field) needs to represent the hours, the second the minutes but not total minutes. So if the elasped time was 62 minutes, I need the first value to be 1 and the second value to be 2. Right now I was doing it on the client side, but I need to have it in the stored procedure. I was hoping someone knew a way to do that cleanly.
>
>
>isnull(datediff(mi,meetings.ProcStart,meetings.ProcEnd),0) as TotalDurationMins,
>isnull(datediff(mi,meetings.ProcStart,meetings.ProcEnd),0) as HolderMins,
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform