Test Data Manager

 View Only
  • 1.  STIME system variable and STRING fucntion give wrong time

    Posted Jul 06, 2022 02:00 PM
    Hi,

    I'm working on TDm Portal version 4.10.29.

    I'm trying to get a time without separator :.
    The best way I found is to use the STRING function to convert the time value from HH:MM:SS to HHMMSS.

    So, here's what I get:

    ~STIME~ -- @string(~STIME~,HH:MM:SS)@ -- @string(~STIME~,HHMMSS)@

    gives

    13:45:39 -- 13:45:39 -- 130100
    Note that 13:45 is the right time. Each time I tried (within the data painter), the first two are changing accordingly with the real time by the third oen stays always the same.

    I us the REPLACE function as a workaround to remove the separator.

    But, I'm woundering why the STRING result does not give the same time, watever teh format is?

    Any clue? 

    Thanks for time

    jf 
     




  • 2.  RE: STIME system variable and STRING fucntion give wrong time

    Broadcom Employee
    Posted Jul 06, 2022 02:12 PM

    My guess would be that we are using a third-party component for the string format of time.
    Probably something native to Java.
    The format you are using of HHMMSS is not generally considered to be a valid date/time format and because it is not the component doesn't know how to handle that situation and is defaulting to some type of output.

    The below link has some possible explanations if you want to dig down into it further.
    Your best option is to use the replace functions you have mentioned.



    ------------------------------
    Gene Howard
    Principal Support Engineer
    Broadcom
    ------------------------------



  • 3.  RE: STIME system variable and STRING fucntion give wrong time

    Posted Jul 06, 2022 02:19 PM
    Thanks Gene...

    Below Link?

    I double checked the documentation an it says

    Returns the specified time as a string in the specified format.
    Parameters:
    • TIME - a time, usually a system or user variable or time valued function or a column reference.
    • TIMEFORMAT - the required time format.



  • 4.  RE: STIME system variable and STRING fucntion give wrong time

    Broadcom Employee
    Posted Jul 06, 2022 02:41 PM
    Based on that link you would have to open a support case and have the dev team look at the code.

    ------------------------------
    Gene Howard
    Principal Support Engineer
    Broadcom
    ------------------------------