The below code will convert the SystemTagDateTime, which is a tag that reports the current time on the HMI, to the format that you want.
To log this value into the datalogger, you will need to add the tag, RefID, to your test. Then it will show up as a column in the datalogger output.
You will need to decide on how you want to trigger the code. You could do it as part of a button that starts your test for example. Or you could put it in the value change event of the SystemTagDateTime tag.Click for more info on DateTime formating
Globals.Tags.RefID.Value = ((DateTime) Globals.Tags.SystemTagDateTime.Value).ToString("ddMMyy-hhmm");
Snap 2012-07-13 at 08.07.31.png [ 108.49 KiB | Viewed 855 times ]