Isac Active Member Licensed User Longtime User Feb 14, 2014 #1 Hello to all, I can not assign the date to the editbox. Can anyone help me? thanks B4X: Sub Button1_Click Dim j As String Dim dd As DateDialog dd.ShowCalendar=False dd.Year = DateTime.GetYear(DateTime.Now) dd.Month = DateTime.GetMonth(DateTime.Now) dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now) j=dd.Show("Inserisci la data", "Data", "OK", "", "", Null) ToastMessageShow(dd.DayOfMonth & "/" & dd.Month & "/" & dd.Year , False) EditText2.Text=j End Sub
Hello to all, I can not assign the date to the editbox. Can anyone help me? thanks B4X: Sub Button1_Click Dim j As String Dim dd As DateDialog dd.ShowCalendar=False dd.Year = DateTime.GetYear(DateTime.Now) dd.Month = DateTime.GetMonth(DateTime.Now) dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now) j=dd.Show("Inserisci la data", "Data", "OK", "", "", Null) ToastMessageShow(dd.DayOfMonth & "/" & dd.Month & "/" & dd.Year , False) EditText2.Text=j End Sub
klaus Expert Licensed User Longtime User Feb 14, 2014 #2 j=dd.Show doesn't return the date as a string but the answer what button was clicked. You should use j = DateTime.Date(dd.DateTicks) Upvote 0
j=dd.Show doesn't return the date as a string but the answer what button was clicked. You should use j = DateTime.Date(dd.DateTicks)