Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Last day of a month
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00287143
Message ID:
00288096
Vues:
17
I just ran a simple test;
LOCAL lnStart, lnEnd
ldDate = DATE()
lnStart = SECONDS()
FOR x = 1 to 100000
	ldLastDay = GOMONTH( ldDate,1 )
	ldLastDay = ldLastDay - DAY( ldLastDay )
ENDFOR
lnEnd = SECONDS()
? "2 lines: ", lnEnd - lnStart

lnStart = SECONDS()
FOR x = 1 to 100000
	ldLastDay = GOMONTH( ldDate,1 ) - DAY( GOMONTH(ldDate,1))
ENDFOR
lnEnd = SECONDS()
? "1 line: ", lnEnd - lnStart
And got the 1 line method to be slightly faster than the 2 line method. The actual times varied on each run but an average of 0.591 seconds for the 2 line version and 0.530 for the one line approach.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform