Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining the End of the Month
Message
From
27/03/1999 20:21:56
 
 
To
26/03/1999 21:27:42
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00199069
Message ID:
00202790
Views:
16
Good pick up; I'd written the Eomth() much earlier than the BoMth() :-)
So the new versions are...

FUNCTION EOMth
LPARAMETER dt
RETURN GOMONTH(m.dt - DAY(m.dt) + 1, 1) - 1

FUNCTION BOMth
LPARAMETER dt
RETURN m.dt - DAY(m.dt) + 1

Thanks

>This is good, but keep in mind that a formula that uses some VFP functions is usual MUCH faster than a UDF using the same VFP functions.
>
>Vlad
>
>>Hiya Dragan,
>>My contribution...
>>
*!***********************************************
>>*!
>>*!       Function: EOMTH
>>*!
>>*!***********************************************
>>FUNCTION EOMth
>>PARAMETER dt
>>RETURN GOMONTH(BOMth(m.dt), 1) - 1
>>
>>*!***********************************************
>>*!
>>*!       Function: BOMTH
>>*!
>>*!***********************************************
>>FUNCTION BOMth
>>PARAMETER dt
>>RETURN m.dt - DAY(m.dt) + 1
>>
>>But I gotta admit I haven't been following the whole thread
Previous
Reply
Map
View

Click here to load this message in the networking platform