Forum Discussion

khanchett's avatar
khanchett
Contributor
5 years ago

Ready API 3.3.1 - messed date up

I just updated my SoapUI to 3.3.1 and now my Groovy dates don't work.  I keep getting errors "groovy.lang.MissingMethodException: No signature of method: java.util.Date.format() ..."  Has anyone else...
  • nmrao's avatar
    5 years ago

    Using Java 8 or more?

     

    Please check the below:

     

    log.info java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern('yyyy-MM-dd'))

     

    In xml

     

    <!-- assuming date is element; change as you needed-->
    <date>${= java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern('yyyy-MM-dd'))}</date>