05.08.2019, 16:08
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
Funtion:
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
Script by event
Code:
require('user.perfil_horario')
date='32/0/23'
days=grp.getvalue('32/0/30')
shiftdate(date,days)
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