Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a function that returns the number of days in a
Message
 
To
10/11/2000 12:31:18
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00440276
Message ID:
00440643
Views:
11
Nope,

Doesn't work for the extremes of long months:
ldAnyDateInMonth = {^2000-01-31}
? GOMONTH(ldAnyDateInMonth,1)- ldAnyDateInMonth  && returns 29
See my response to evan above for one that does work.

Cheers,

Andrew

>>Nope but try
>>
>>** gets number of days in given month
>>ldDate = DATE() && or whatever
>>ldFirst = DATE(YEAR(ldDate), MONTH(ldDate), 1)
>>lnDaysInMonth = GOMONTH(ldFirst,1)-ldFirst

>
>Actually, you don't need the first 2 lines,
>IOW
>
>lnDaysInMonth = GOMONTH(ldDate,1)-ldDate


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Reply
Map
View

Click here to load this message in the networking platform