I want to make a string = to the current date and time in the format yyyy-MM-dd HH:mm:ss
Simple enough in VB but not quite so in B4A.
I can do the code below...
But that seems a little long winded. I am guessing I use DateTime.DateFormat but I can't seem to get it to work.
Thanks in advance
Simple enough in VB but not quite so in B4A.
I can do the code below...
B4X:
Dim sNow As String = DateTime.getyear(DateTime.Now) & "-" & DateTime.GetMonth(DateTime.Now) & "-" & DateTime.GetDayOfMonth(DateTime.Now) & " " & DateTime.GetHour(DateTime.Now) & ":" & DateTime.getminute(DateTime.Now) & ":" & DateTime.GetSecond
Thanks in advance