Forum Discussion
Department_of_T
11 years agoContributor
I have it working. Thanks
import groovy.time.TimeCategory
def XMLDate = context.expand( '${JDBC Request to verify acc_account_items#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/DEALING_TO_DATE[1]}' )
def SQLdate = context.expand('${JDBC Request to find vehicle#ResponseAsXml#//Results[1]/ResultSet[1]/Row[1]/LICENCE_EXPIRY_DATE[1]}' )
def shortSQLDate = new Date().parse("yyyy-MM-dd",SQLdate)
def shortXMLDate = new Date().parse("yyyy-MM-dd",XMLDate)
use(TimeCategory) {
shortSQLDatePlusOne=shortSQLDate + 6.month
}
log.info shortSQLDatePlusOne
log.info shortXMLDate
assert shortSQLDatePlusOne == shortXMLDate