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.

1 Day day later of date and 1 hour later of time
#1
Hi I need to calculated 1 day later of the dateĀ  and 1 hour later of the time and writeeach values to a groupp adddress.

How can i calculate via script ?
Reply
#2
Code:
-- get current timestamp (in seconds) and add 25 hours to it
ts = os.time()
ts = ts + 25 * 60 * 60

-- convert timestamp to table
date = os.date('*t', ts)

-- update objects with 3 byte date / time data types
grp.checkupdate('32/0/20', date)
grp.checkupdate('32/0/21', date)
Reply


Forum Jump: