AnsweredAssumed Answered

Timestamp comparison

Question asked by midgard on Jan 21, 2016

Is there a way to compare two timestamps given the following response data:

 

I have a test step that produces an fl_P8_Response response row that includes a "Timestamp" column (eg. 2016-01-21 09:44:11,684) and a "Long" column (eg. <?xml version="1.0" encoding="UTF-8"?><list><string>2016-01-19 16:45:17.527</string></list>). Ultimately, I'd like to check that one is within 15 minutes of the other per some logic I'm including.

 

In my validating test step I've included: lastRun=(test.Exec.getStateValue("fl_P8_Response"));

 

so, I'd need something like "if (lastRun..." that takes the 2016-01-21 09:44 part and compares it to the value 2016-01-19 16:45 + 15 minutes.

 

Straight Java provides options for this kind of thing, but in this case I need to Lisa-ize it.

 

Any thought on this?

 

Thanks,

Dave

Outcomes