-
finding # of days in a month
is there a method or function to determine the # of days for a given month
and a given year? thanks in advance.
-
Re: finding # of days in a month
rich,
I don't know your language of choice, but:
Convert your month and year to a form like MM/01/YYYY, then add 1 month,
and get the difference in terms of days.
Example:
Given 10 for month, and 2000 for year, take 10/01/2000, and add one
month, using whatever date mathematics you have available. Next, subtract
the dates from each other to return number of days. This can normally be
reduced to one statement.
Regards,
D. Patrick Hoerter
rich <rperez@teleteam.net> wrote in message news:39b69895$1@news.devx.com...
>
> is there a method or function to determine the # of days for a given month
> and a given year? thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks