Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number of days in a month
Message
From
12/10/1997 12:11:37
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
09/10/1997 19:43:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00053634
Message ID:
00054227
Views:
29
>>>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 >> >>Func DaysInMonth >>Lpara date_ld >>Local days_ln, first_ld >>* get the first day of the month >>first_ld=date_ld-day(date_ld) >>* difference to the first day of the next month >>days_ln=GoMonth(first_ld,1)-first_ld >>retu days_ln >> >>The function I've sent few days ago is not sure to work on 31st - may >>since GoMonth of 31st of may is 30th of June and so on. This way we >>calculate the distance from the first day of the month to the first day >>of the next month - every month has a first day, doesn't it? > >Yes, but first_ld=date_ld-day(date_ld) gives the last day of the previous >month instead of the first one current month (you're off by one). > >Vlad I've forgot the one? Oh... I'd really better go to sleep before 2AM at least once a week... I did think of a +1 there, just forgot to type it. Sorry, folks.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform