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.

Change month and year in a time script
#3
Hi Admin, thanks for replying. I used the function, but it is not working for me, I don't know if it is because of my bad configuration of both the types of data or I am omitting something previous. I attach the error message, the object settings and the script by event. Thank you and I am attentive to your comments.

Script by event
Code:
require('user.perfil_horario')

date='32/0/23'
days=grp.getvalue('32/0/30')
shiftdate(date,days)
Funtion:

Code:
function shiftdate(date,days)
  date.hour = 12
  return os.date('*t', os.time(date) + days * 86400)
end

Log Error:

Event for Tiempo Check Out (32/0/24) 05.08.2019 10:55:21
User library perfil_horario:2: attempt to index local 'date' (a string value)
stack traceback:
User library perfil_horario:2: in function 'shiftdate'
User script:15: in main chunk

Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
RE: Change month and year in a time script - by Carlos Padilla - 05.08.2019, 16:08

Forum Jump: