makis_best Well-Known Member Licensed User Longtime User Jul 22, 2019 #1 Hi. I try to parse a date to a DatePicker. The date format is yyyy-MM-dd. I try using the code B4X: DateTime.DateFormat = "yyyy/MM/dd" AnotherDatePicker1.Date = DateTime.DateParse(Curs1.GetString("InsDate")) But I always get the error java.text.ParseException: Unparseable date: "2019-07-22" (at offset 4) Why?
Hi. I try to parse a date to a DatePicker. The date format is yyyy-MM-dd. I try using the code B4X: DateTime.DateFormat = "yyyy/MM/dd" AnotherDatePicker1.Date = DateTime.DateParse(Curs1.GetString("InsDate")) But I always get the error java.text.ParseException: Unparseable date: "2019-07-22" (at offset 4) Why?
Erel B4X founder Staff member Licensed User Longtime User Jul 22, 2019 #2 makis_best said: Why? Click to expand... The date string doesn't match the set format. Change the format to yyyy-MM-dd Upvote 0
makis_best said: Why? Click to expand... The date string doesn't match the set format. Change the format to yyyy-MM-dd
makis_best Well-Known Member Licensed User Longtime User Jul 22, 2019 #3 Perfect Works now... Thank you. Upvote 0