Forum Discussion

ramzsvs's avatar
ramzsvs
Occasional Visitor
5 years ago

How to covert milliseconds to UTF date format to verify from DB

When I send request I am getting response in milliseconds [1576522684000], how can I covert it to UTF date format 2019-12-16-13:58:06.070000 to validate my request and DB response. Thanks in advance....
  • richie's avatar
    richie
    5 years ago

    Hey ramzsvs

    Sorry, i only just noticed this ticket, f youre still struggling, try this

    def milval=testCase.getPropertyValue("valuepropname").toLong
    
    log.info new Date(milval).format("yyyy-MM-dd'T'Hh:mm:ss.SSS'Z'")



    Ta

    Rich