Please help how can i today's date and then convert it to show current date and time i have tried but i get this eer
B4X:
Sub Timestamp_Brasileiro(dataTimeStamp As String) As String
DateTime.DateFormat = "dd/MM/yyyy" : DateTime.TimeFormat = "HH:mm:ss"
Dim dataTempo() As String = Regex.Split(" ", dataTimeStamp)
Private ltempo As Long = DateTime.DateTimeParse(dataTempo(0),dataTempo(1))
DateTime.DateFormat = "dd/MM/yyyy" : DateTime.TimeFormat = "HH:mm"
Return DateTime.Date(ltempo) & " " & DateTime.Time(ltempo)
End Sub
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 60 (Main)
java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at java.lang.reflect.Array.get(Array.java:170)
at anywheresoftware.b4a.shell.ArraysUtils.getElement(ArraysUtils.java:76)
at anywheresoftware.b4a.shell.Shell.getArrayElement(Shell.java:588)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:387)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at de.amberhome.slidemenuexample.main.afterFirstLayout(main.java:104)
at de.amberhome.slidemenuexample.main.access$000(main.java:17)
at de.amberhome.slidemenuexample.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)