I don't know if that's new in V19, but in V19 you can change the clock element to a digital clock. Sadly it has no date or I haven't found it yet. I don't know what it's called in english but in german it's in "Gestaltung, Gestaltung - Stilelement"
Thank you for the video. I ran into a time zone issue. How to correctly set the local time? How can I make the time and date be in different rows (not in the same row)? How can I output only the time without the date?
for local time try this var value; value = new Date().toLocaleString(); return value; optionally for zones value = new Date().toLocaleString('en-US'); // use American format value = new Date().toLocaleString('en-US', {hour12: false}); // use American format with 24 hours
Thank you sir... How to change the format to date month year ❤
I don't know if that's new in V19, but in V19 you can change the clock element to a digital clock. Sadly it has no date or I haven't found it yet. I don't know what it's called in english but in german it's in "Gestaltung, Gestaltung - Stilelement"
thank you for the video.
do you know how to show only the date without time?
I think you could change line 4 to:
value = DateTime.getDate();
Let me know if this works
Thank you for the video.
I ran into a time zone issue. How to correctly set the local time?
How can I make the time and date be in different rows (not in the same row)?
How can I output only the time without the date?
for local time try this
var value;
value = new Date().toLocaleString();
return value;
optionally for zones
value = new Date().toLocaleString('en-US'); // use American format
value = new Date().toLocaleString('en-US', {hour12: false}); // use American format with 24 hours
you can separate format by using toLocaleTimeString to get time
value = new Date().toLocaleTimeString();
Can you add more videos about JavaScript in WinCC Unified ??
That is my plan to do #javascript and #tiaportal videos
why is my clock not in sync
I used the same script but it's not work in the simulation.