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.

grp.chackwrite in date/time object
#2
Date and time are not in this format. Try this.
Code:
-- get current data as table
now = os.date('*t')
-- system week day starts from sunday, convert it to knx format
wday = now.wday == 1 and 7 or now.wday - 1
-- time table
time = {
day = wday,
hour = now.hour,
minute = now.min,
second = now.sec,
}
-- date table
date = {
day = now.day,
month = now.month,
year = now.year,
}
-- write to bus
grp.checkwrite('1/1/2', time, dt.time)
grp.checkwrite('1/1/1', date, dt.date)
------------------------------
Ctrl+F5
Reply


Messages In This Thread
grp.chackwrite in date/time object - by emme - 02.08.2021, 09:23
RE: grp.chackwrite in date/time object - by Daniel - 02.08.2021, 09:52

Forum Jump: