Forum Discussion

richie's avatar
Community Hero
6 years ago

Truncate value once it's been extracted as a property before passing to subsequent request?



Sorry - I'm posting a lot today.


I have a GET request that I need to test and the query parameters on the GET equate to the table attributes and values that will be queried via various different applications.


One of the attributes entitled 'EffectiveFrom' is an SQLServer datetime2(3) type - meaning if I do a GET on the table, each record has an EffectiveFrom value in the format '2017-01-01T00:00:00.0000000'


My testcase object hierarchy is as follows:



REST1 step (GET) 

PropertyTransfer1 (grabs the EffectiveFrom attribute value from one of the records in the resultset passing  it to the Properties1 step)

Properties1 step (propertyname = 'EffectiveFrom', propertyvalue = '2017-01-01T00:00:00.0000000' 

REST2 step (GET) ${Properties1#EffectiveFrom}



I get ZERO rows returned


HOWEVER - if I submit the query works and rows are retrieved


Does anyone know how I can effectively do a property transfer and truncate the value (stripping the time details) from the value so the following GET request works correctly?



I hope I've been clear, I know I struggle with this sometimes!


many thanks to all!



3 Replies

  • Lucian's avatar
    Community Hero

    Did you manage to solve it so far?


    If not, is the date always in the same format as in yyyy-mm-dd?

    • richie's avatar
      Community Hero

      Hey Lucian


      thanks for responding - I discovered the developer of the API had actually coded a defect - hindering the return of the datetime value - so its all good


      thanks man,



      • TanyaYatskovska's avatar
        SmartBear Alumni (Retired)

        Hi Richie,


        Do you mind posting the full solution so that other community members can find it easier?

        We will mark it accordingly. Thanks!