ayasoapui
15 years agoOccasional Contributor
groovy select date object loses time value
Hi,
I am using groovy script as a step in SoapUI.
In my groovy script, I need to select a date column from an Oracle DB.
The column start_date has value "1/17/2011 4:00:00 PM".
start_date is defined as DATE data type in the database.
When I select using groovy:
db.eachRow("select * from table where <conditon>") {
startDate = it.start_date
}
the returned startdate only returns '1/17/2010'. It loses the "4:00:00 PM" part.
I need the whole value for my assertion.
Any ideas why or what should I do?
I am using groovy script as a step in SoapUI.
In my groovy script, I need to select a date column from an Oracle DB.
The column start_date has value "1/17/2011 4:00:00 PM".
start_date is defined as DATE data type in the database.
When I select using groovy:
db.eachRow("select * from table where <conditon>") {
startDate = it.start_date
}
the returned startdate only returns '1/17/2010'. It loses the "4:00:00 PM" part.
I need the whole value for my assertion.
Any ideas why or what should I do?