Svetlana
9 years agoOccasional Contributor
Current date in SoapUI NG
Hello, I need to insert the current date into XML file. Is there an opportunity to generate the current date? Data Generator doesn't allow that.
- 9 years ago
try using following code.
TimeZone.setDefault(TimeZone.getTimeZone('EST'))
def now = new Date();
def ExecutionStartDate = now.format("yyyy-MM-dd hh:mm:ss.SSS")Note that you can change the timezone and date format as you need.
- 9 years ago
You can do it in a Groovy script then set the date to a custom property. You should then easily be able to insert into your XML