I need to set the DateFormat to yyyy-mm-dd , but the string from DateDialog still uses yyyy-m-d.
How can I set the return DateFormat to yyyy-mm-dd from DateDialog?
Any help will be appreciate it.
B4X:
Sub Button1_Click
Dim Dd As DateDialog
Dim thedate As String
Dd.Year = DateTime.GetYear(DateTime.Now)
Dd.Month = DateTime.GetMonth(DateTime.Now)
Dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now)
ret = Dd.Show("Set the required date", "Date Dialog", "OK", "Cancel", "", Bmp)
thedate = Dd.Year & "-" & Dd.Month & "-" & Dd.DayOfMonth
DateTime.DateFormat = "yyyy-mm-dd"
Label1.Text= thedate
End Sub
How can I set the return DateFormat to yyyy-mm-dd from DateDialog?
Any help will be appreciate it.