Forum Discussion
MikeGatward
Occasional Contributor
Might be nice to share the solution ?
testhrishi
7 years agoFrequent Contributor
This worked for what I was trying to do.
def format1 = context.expand( '${#TestCase#parseEnd}' )
def format2 = context.expand( '${#TestCase#IncorporationStart}' )
def format3 = Date.parse("yyyy-MM-dd'T'hh:mm:ss'Z'", format1)
def format4 = Date.parse("yyyy-MM-dd'T'hh:mm:ss'Z'", format2)
long timeDiff = (format4.getTime() - format3.getTime())/1000