current time in label

Fox

Active Member
Licensed User
Longtime User
Hy if i use this for showing the current time in an label i get an error:

Dim now As Long
lbl_Time.Typeface = ProgrammFont
lbl_time = DateTime.Time(now)
lbl_time.Typeface = ProgrammFont

this is the error:

Compiling code. 0.06
Generating R file. 0.00
Compiling generated Java code. Error
B4A line: 617
lbl_time = DateTime.Time(now)
javac 1.6.0_25
src\com\new\c\main.java:1173: inconvertible types
found : java.lang.String
required: android.widget.TextView
_lbl_time.setObject((android.widget.TextView)(anywheresoftware.b4a.keywords.Common.DateTime.Time(_now)));
^
1 error

how can i show the current time in an label?

I don't understand this because it should work....
 
Last edited:
Top