A1VBCode Forums

Determine Next birth date


http://www.a1vbcode.com/vbforums/Topic31930.aspx

By ChapMan - 3/28/2013

Hi Senior learned colleagues



Please i need to determine the next birth date of a user.

if the user date of birth is 01-Jan-08, on what date will he be 30 years

thanks in advance
By Mark - 3/29/2013

I think AddYear is what you are looking for

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim dte As Date

        dte = Convert.ToDateTime("01-Jan-08").AddYears(30)
        MessageBox.Show(dte.ToString("dd-MMM-yy"))
    End Sub