Print text and time in the same object

2022-05-19
2022-05-19
  • nothinrandom - 2022-05-19

    Hey Folks,

    I am not sure what the proper format is to print both text and time in the same object (e.g. textbox, lable, rectangle, etc). For formatting guide is located via https://help.codesys.com/webapp/_visu_placeholder_with_formatting_sequence_in_a_string;product=core_visualization;version=3.5.17.0.

    Currently, I have two labels: one that prints the string variable (%s) and one that prints the time (%t[yyyy-MM-dd dddd]); regarding time, no need to specify a variable. These two show correct data. However, if I try to merge them into one so that the label shows %s %t[yyyy-MM-dd dddd, then it only shows s 2022-05-18 Wednesday

    What I am interested in is the end result of TEST 2022-05-18 Wednesday, where TEST is set by a string variable. I know I can hack some code to concat string, but I'm trying to stay away from that and keep it as simple as possible.

    Thanks,

     
  • i-campbell

    i-campbell - 2022-05-19

    This is not yet possible. There is an existing improvement suggestion for "It should be possible to configure multiple text variables", I have commented that you are also interested in it.

     
  • nothinrandom - 2022-05-19

    Thanks Ian! Also thanks for confirming. Yes, this would be super useful. I guess for now, it's concating then.

     

Log in to post a comment.