Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subtracting hours
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00795391
Message ID:
00795406
Vues:
15
>As I can make to subtract hours? I need a code that can subtract hours

If the stop/start times are in datetime format and you need the result in a character format, the following code will do it.

mtime=stop-start
msecs=mtime%60
mtime=int(mtime/60)
mmins=mtime%60
mhrs =int(mtime/60)
hrsworked = str(mhrs,2)+':'+iif(mmins>9,str(mmins,2),'0'+str(mmins,1))+':'+iif(msecs>9,str(msecs,2),'0'+str(msecs,1))
If Bill Gates had a penny for every time windows crashed he'd be... Oh wait he does!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform