Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Last day of a month
Message
 
To
06/11/1999 13:12:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00287143
Message ID:
00288096
Views:
16
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform