Hi Rich,
Thanks for the reply - ignore the .net comment! I was getting that crossed with another issue I was working at the time.
I get the below error with ${=new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date())}
"occurredOn" : "startup failed:
Script1.groovy: 1: unexpected char: '\' @ line 1, column 32.
new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\").format(new Date()) ^
org.codehaus.groovy.syntax.SyntaxException: unexpected char: '\' @ line 1, column 32.
In the end I just used the following to me get quickly going - not sure if it's the best solution but it works for me. I had to create a Groovy script and then just reference it.
def CurrentYearTime = use( groovy.time.TimeCategory ) { new Date()}.format("yyyy-MM-dd'T'HH:mm")
testRunner.testCase.setPropertyValue( "CurrentYearTime", CurrentYearTime )