Dim dateTime As DateTime = Convert.ToDateTime(txtBirthDate.Text.Trim())
txtRetirmentDate.Text = dateTime.AddYears(58).ToString("dd/MM/yyyy")
how to implement above code into vb6.0 from vb.net
Dim dateTime As DateTime = Convert.ToDateTime(txtBirthDate.Text.Trim())
txtRetirmentDate.Text = dateTime.AddYears(58).ToString("dd/MM/yyyy")
how to implement above code into vb6.0 from vb.net
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Senthil KumarPosted Aug 3, 2022, 5:30 AM
Private Sub btnshow_Click()
Dim datetime1 As Date
Dim datetime2 As Date
txtDatetime1.Text = Format(Date, "dd/MMM/yyyy", vbSunday, vbFirstJan1)
datetime1 = txtDatetime1.Text
'datetime1 = CDate(txtDatetime1.Text)
'datetime2 = DateAdd("yyyy", 58, datetime1)
Dim nYear, nMonth As String
nYear = Year(datetime1)
nMonth = Month(datetime1)
datetime2 = DateSerial(nYear + 58, nMonth + 1, 0)
txtDatetime2.Text = Format(datetime2, "dd/MMM/yyyy", vbSunday, vbFirstJan1)
End Sub
Bhavesh VankarPosted Aug 3, 2022, 6:49 AM
Vishal YelvePosted Aug 2, 2022, 10:41 AM
Bhavesh VankarPosted Aug 2, 2022, 10:13 AM
Vishal YelvePosted Aug 2, 2022, 9:56 AM
Bhavesh VankarPosted Aug 2, 2022, 9:53 AM
Vishal YelvePosted Aug 2, 2022, 7:00 AM