I read a date form a sqlite database.
The fomat is yyyy-dd-MM
I need it in dd/MM/yyyy
Im using this code but the resulting year is not ok
B4X:
dim f as int
dim fecha as string
DateTime.DateFormat="yyyy-dd-MM"
f = DateTime.DateParse(cursor1.GetString("fecha"))
Log(cursor1.GetString("fecha")&" "&f)
DateTime.DateFormat="dd/MM/yyyy"
fecha = DateTime.Date(f)