Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function to get the last day of month
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00039619
Message ID:
00040411
Views:
37
>> Right you are, here;s my revised code that doesn't break for August.
>>
>> ldDate = {08/01/97}
>> ? (GoMonth(ldDate,1)-day(gomonth(ldDate,1)-1)-1) && returns 08/31/97
>
>Well, this thread's been going on for long enough without me responding.
>
>Here's my version of the function.
>
>m.ldDate = {any date)
>? gomonth(m.ldDate-day(m.ldDate)+1,1)-1
>
>Basically:
>
>1) go to the first day of the current month
>2) advance a month
>3) backup 1 day
Paul,

I like it, one less Gomonth call.
Previous
Reply
Map
View

Click here to load this message in the networking platform