Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20755

Need to insert tomorrow's date in JDBC Request Step in "yyyy-MM-dd'T'HH:mm:ss" format

$
0
0

Hi,

 

I need to insert a row having tomorrow's date as a value of date column by using the JDBC request step. Along with date I am reading some other values from by previous JDBC result. I have manage yo write a groovy script to format the date in required format by using below code

import groovy.time.TimeCategory
use ( TimeCategory )
{
	def tmpDate = new Date() + 2.days
	log.info tmpDate.format("yyyy-MM-dd'T'HH:mm:ss")
}

But my question is how can I use this date in my below SQL

INSERT into [dbo].ORTCommandPropertyData
([CommandID],[CommandPropertyID],[CommandTypeID],[PropertyValue],[LastUpdated] )
VALUES ('${JDBCRequestForCommandInCoolingOff#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/COMMANDID[1]}',61,81,'2016-01-27T10:00:00',NULL);

Thanks,


Viewing all articles
Browse latest Browse all 20755

Trending Articles