vmag Active Member Jun 1, 2020 #1 - 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 ???
- 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 ???
Philip Chatzigeorgiadis Active Member Licensed User Longtime User Jun 1, 2020 #2 Use this: B4X: DateTime.DateFormat="dd/MM/yyyy" Upvote 0
vmag Active Member Jun 1, 2020 #3 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
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
Philip Chatzigeorgiadis Active Member Licensed User Longtime User Jun 1, 2020 #4 Try this: B4X: DateTime.DateFormat="dd/MM/yyyy" Txt1.Text=DateTime.Date(DatePicker.DateTicks) Upvote 0
vmag Active Member Jun 1, 2020 #5 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
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...
Erel B4X founder Staff member Licensed User Longtime User Jun 1, 2020 #6 Adding 1 to a ticks value will add 1 millisecond. Subtracting 1 will subtract 1 millisecond. All the questions in this thread are answered in the date and time video tutorial: https://www.b4x.com/etp.html?vimeography_gallery=1&vimeography_video=256970493 Upvote 0
Adding 1 to a ticks value will add 1 millisecond. Subtracting 1 will subtract 1 millisecond. All the questions in this thread are answered in the date and time video tutorial: https://www.b4x.com/etp.html?vimeography_gallery=1&vimeography_video=256970493