Most of us used digital clock at come point in previous Siemens HMI software packages. But strangely with introduction of TIA Portal WinCC Unified, digital clock has gone and library only contains an analogue clock.
But there is a way of creating digital clock by using IO field and setting its value by Java Script. Using Date call we can get date and time and write it into tag or process value of IO Field

Script is very simple. Here is example of JavaScript assigned to IO Field

Watch video which shows step by step instruction
Wonder why Siemens did not added it as standard object. But this is a trick I was looking for