D Declan Well-Known Member Licensed User Longtime User Jul 25, 2017 #1 I have the following code: B4X: DateTime.DateFormat="dd-MM-yyyy HH:mm:ss" Dim MyTime As String Dim MyTime As String MyTime = DateUtils.TicksToString(DateTime.Now) The result is: B4X: 25-07-2017 16:15:35 16:15:35 I cannot understand why I get the additional " 16:15:35"
I have the following code: B4X: DateTime.DateFormat="dd-MM-yyyy HH:mm:ss" Dim MyTime As String Dim MyTime As String MyTime = DateUtils.TicksToString(DateTime.Now) The result is: B4X: 25-07-2017 16:15:35 16:15:35 I cannot understand why I get the additional " 16:15:35"
DonManfred Expert Licensed User Longtime User Jul 25, 2017 #2 DATEformat should hold the format JUST FOR THE DATE!!! DateUtils.TicksToString(DateTime.Now) uses Dateformat to format the date and Timeformat to format the time. So the result IS EXPECTED: Dateformat (25-07-2017 16:15:35) + timeformat (16:15:35) Upvote 0
DATEformat should hold the format JUST FOR THE DATE!!! DateUtils.TicksToString(DateTime.Now) uses Dateformat to format the date and Timeformat to format the time. So the result IS EXPECTED: Dateformat (25-07-2017 16:15:35) + timeformat (16:15:35)
Peter Simpson Expert Licensed User Longtime User Jul 25, 2017 #3 B4X: DateTime.DateFormat = "dd-MM-yyyy" '25-07-2017 15:42:00 Upvote 0