This code is from Mr. Mustafa in Add Days to Date and Display in TextBox in VB.Net. Can anyone help me how to change lveform.text(Datetimepicker) to textbox in this format = MM/dd/yyyy.
This is the code:
Protected Sub lvefrom_TextChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles lvefrom.TextChanged Dim ObjLocDate As New Date Dim IntLocDays As Integer IntLocDays = Convert.ToInt32(lve.Text) ObjLocDate = lvefrom.Text ObjLocDate = ObjLocDate.AddDays(IntLocDays) lveto.Text = ObjLocDate.Date.ToString("dd-MMM-yyyy") End Sub
Yes, You can do that.
The above code which you have posted is right.
And if your issue is resolved than mark the codes posted by me above as answer so that the other users can refer it
© COPYRIGHT 2024 ASPSnippets.com ALL RIGHTS RESERVED.