Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function to get the last day of month
Message
 
To
15/07/1997 18:58:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00039619
Message ID:
00040407
Views:
44
>>>Yours will not work with a few dates...for example try August 31st. It will return August 30th.
>>>
>>>Needs to be in two steps with the second step using the next month's day.
>>>
>>>Take care,
>>>Joe
>>Joe,
>>
>>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
>
>Actually, your old formula worked fine. The new one doesn't. (It returns 07/31/97).
>
>Vlad
Vlad,

You're right so we stay with

? GoMonth(ldDate,1)-day(gomonth(ldDate,1)
Previous
Reply
Map
View

Click here to load this message in the networking platform