Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Datetime - datetime
Message
De
23/01/2001 01:32:50
 
 
À
23/01/2001 01:11:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00467137
Message ID:
00467143
Vues:
13
>I am substracting two datetime values which gives a datetime. Now, with that value, I want to convert that in how many days and how many hours. Is there a function somewhere to do that?

No, datetime arithmetic yields results in seconds. So:
lt2 - lt1 = lnSecondsDifference
lnDaysDifference = INT(lnSecondsDifference / 86400)
lnHoursRemainder = (lnSecondsDifference - (lnDaysDifference * 86400)) / 3600
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform