B4J Question DatePicker and date format

vmag

Active Member
- My date format is "dd.MM.yyyy" (my computer has it too)
- DatePicker displays 05/31/2020
- I do:
B4X:
DatePicker.DateFormat = "dd.MM.yyyy"
and DatePicker displays 31.05.2020 (Excellent!)
- Next, I do:
B4X:
Txt1.Text=DateUtils.TicksToString(DatePicker.DateTicks)
and get the result "05/31/2020 00:00:00"
- how do I get in Txt1.Text value "31.05.2020" i.e. how it DatePicker displays ???
 

vmag

Active Member
Thank you, You helped me a lot! Isn't there an option to get a string with only a date and no time? And then I had to look for an additional procedure like this
 
Upvote 0

vmag

Active Member
To be honest, some points in B4J are illogical and I am put in a stupor, for example:
B4X:
DatePicker.Datetics = DatePicker.Datetics - 1
is a transition to the previous day, and
B4X:
DatePicker.Datetics = DatePicker.Datetics + 1
is not a transition to the next day, and it is not clear what...
 
Upvote 0
Top