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.
Solved! Go to Solution.
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
You can search google for how to do this. If you want to do the conversion with a Groovy script, then here are the keywords I would use - "java convert milliseconds to utc date". You can try using groovy instead of java also, but java will give more results. We can use java libraries inside our groovy scripts.
Similarly, if you wanted to do the conversion with sql instead, you can search for "sql convert milliseconds to utc date". You can also mention the dialect of sql you are using such as sql server, mysql etc.
Here are all the java based google search results from stackoverflow:
https://www.google.com/search?q=java+convert+milliseconds+to+utc+date+site:stackoverflow.com
good luck!
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