This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Hour:Minutes
#1
Hello!

Could someone help me with a script to display only hour:minutes in visualization?
Reply
#2
Do you want it to be read-only or do you want to be able to change the value?
Reply
#3
Read only
Reply
#4
The you can use a string/text object like this:
Code:
-- get current date as a table
date = os.date('*t')
-- format as HH:MM
text = string.format('%02d:%02d', date.hour, date.min)
grp.update('1/1/1', text, dt.string)
Reply


Forum Jump: