Fill text input with timestamp from integers

Hello out there!

I am having a text input configured as time picker which sends hour and minute to my PLC.
Now i try to read back the value from the PLC.
So i have an integer "hour" and one integer "minute".

Is it possible tr make a valid timestamp from these two?

many greetings

Welcome to the forum @steifhahn

That depends on what you mean by a valid timestamp. If you mean a JavaScript timestamp then you also need the date and timezone.

Thx Colin.

Ok i got it working. Was easier than expected, maybe i thought too dificult. Because info of text inpute states:

"The time input type returns a number of milliseconds from midnight."

And i had in mind that dates starts from 1970.....

Javascript timestamps do start from 1970 and are measured in msec. That is why I said at the start that the solution depends on what you mean by a 'valid timestamp'.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.