Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.