Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate Time
Message
 
 
À
13/01/2004 17:36:00
Fred Wood
Madera Systems Consulting
Mill Valley, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00866522
Message ID:
00866527
Vues:
27
>Does anybody have a function for calculating TIME() + x minutes?
>
Hi Fred,

Here's the function I just wrote that should do what you want.
FUNCTION AddTime
LPARAMETERS tcTime, tnMinAdd
LOCAL ltTemp, lnSec
ltTemp = CTOT(tcTime) + tnMinAdd * 60
lnSec = ltTemp - DTOT(TTOD(ltTemp))
RETURN PADL(INT(lnSec/3600), 2, "0") + ":" + ;
		PADL(INT((lnSec%3600)/60),2, "0") + ":" + ;
		PADL(lnSec % 60,2, "0") 
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform