VB.NET

Moderators: seancampbell
Number of threads: 4020
Number of posts: 10026

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
hi,this is very urgent !! please Posted by keerthi23 on 7 Jan 2007 at 10:38 AM
hello,

this my college project i want to create a database of students birthday database i want to display only dates of the month if the year has only has 31 days it wants to display from 1-31 or if it is leap year it should display 29 days in feb. like this for all months
Report
Re: hi,this is very urgent !! Use daysInMonth method.>> Posted by DrMarten on 7 Jan 2007 at 2:17 PM
This message was edited by DrMarten at 2007-1-7 14:21:15

: hello,
:

---------------Edited text.-----------------------------------

This my college project i want to create a database of students birthday database i want to display only dates of the month, if in the year the month only has 31 days it wants to display from 1-31 or if it is leap year it should display 29 days in feb. like this for all months.

--------------------------------------------------------------


Hi,

Const July As Integer = 7
Const Feb As Integer = 2

' daysInJuly gets 31.
Dim daysInJuly As Integer = System.DateTime.DaysInMonth(2001, July)

' daysInFeb gets 28 because the year 1998 was not a leap year.
Dim daysInFeb As Integer = System.DateTime.DaysInMonth(1998, Feb)

' daysInFebLeap gets 29 because the year 1996 was a leap year.
Dim daysInFebLeap As Integer = System.DateTime.DaysInMonth(1996, Feb)


Regards,

Dr M.







 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.