D Declan Well-Known Member Licensed User Longtime User May 4, 2020 #1 Is it possible to convert DateTime to a String format? I have: B4X: Copy Dim MyTime As String = DateTime.now Log(MyTime) which returns: B4X: Copy 1588594976350 How can I get this into a normal text representation" Something similar to: B4X: Copy 03 May 2020 11:47:38
Is it possible to convert DateTime to a String format? I have: B4X: Copy Dim MyTime As String = DateTime.now Log(MyTime) which returns: B4X: Copy 1588594976350 How can I get this into a normal text representation" Something similar to: B4X: Copy 03 May 2020 11:47:38
D Declan Well-Known Member Licensed User Longtime User May 4, 2020 #2 Got it: B4X: Copy Dim date_string As String DateTime.DateFormat = "dd/MM/yyyy" DateTime.TimeFormat = "HH:mm:ss" date_string=DateTime.Date(DateTime.Now) & " " & DateTime.Time(DateTime.Now) Upvote 0
Got it: B4X: Copy Dim date_string As String DateTime.DateFormat = "dd/MM/yyyy" DateTime.TimeFormat = "HH:mm:ss" date_string=DateTime.Date(DateTime.Now) & " " & DateTime.Time(DateTime.Now)