General information
Category:
Coding, syntax & commands
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only