hi,this is very urgent !! please - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

hi,this is very urgent !! please

keerthi23keerthi23 Posts: 7Member
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

Comments

  • DrMartenDrMarten Posts: 748Member
    [b][red]This message was edited by DrMarten at 2007-1-7 14:21:15[/red][/b][hr]
    : hello,
    :
    [b][blue]
    ---------------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.

    --------------------------------------------------------------
    [/blue][/b]

    Hi,

    [code]
    Const July As Integer = 7
    Const Feb As Integer = 2
    [b][green]
    ' daysInJuly gets 31.[/green][/b]
    Dim daysInJuly As Integer = System.DateTime.DaysInMonth(2001, July)
    [b][green]
    ' daysInFeb gets 28 because the year 1998 was not a leap year.[/green][/b]
    Dim daysInFeb As Integer = System.DateTime.DaysInMonth(1998, Feb)
    [b][green]
    ' daysInFebLeap gets 29 because the year 1996 was a leap year.[/green][/b]
    Dim daysInFebLeap As Integer = System.DateTime.DaysInMonth(1996, Feb)
    [/code]

    Regards,

    Dr M.




Sign In or Register to comment.