Forum Discussion
Finan
15 years agoFrequent Contributor
You could achieve it via the following groovy script:
dateString is to simulate your db data String.
you could change this to the following for your case:
dateString = new Date().format("yyyy-MM-dd HH:mm:ss");
dateInstance = new Date().parse("yyyy-MM-dd HH:mm:ss", dateString);
newDateString = dateInstance.format("yyyy-MM-dd'T'HH:mm:ss");dateString is to simulate your db data String.
you could change this to the following for your case:
dateString = context.expand( '${jdbc_response#ResponseAsXml#//Results[1]/DateString[1]}' )
dateInstance = new Date().parse("yyyy-MM-dd HH:mm:ss", dateString);
newDateString = dateInstance.format("yyyy-MM-dd'T'HH:mm:ss");