Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of days in a month
Message
From
09/10/1997 08:45:54
 
 
To
09/10/1997 08:13:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00053634
Message ID:
00053844
Views:
23
>>Is there a function to get the number of days in a month.
>>eg. the number of days in any month of any year.
>>
>>Thanks
>>Andrew
>
>
>There are 3rd party functions available but it's soooo easy to roll your own.
>
>Let's say you want to know the number of days in November, 1997:
>
>nNumberofDaysInMonth = val(sys(11,{12/1/97}) - val(sys(11,{11/1/97})
>
>What your doing is getting the Julian date for the start date of each month and calculating the difference. The diffenece is the number of days is in the first month.
>
>Hope this helps.
>
>Andrew

nNumberofDaysInMonth = {12/1/97}-{11/1/97}

gives the same thing.

Vlad
Previous
Reply
Map
View

Click here to load this message in the networking platform