Forum Discussion

cpgutierrezm's avatar
cpgutierrezm
Occasional Contributor
6 years ago

How to do to get date from the system

Hi, please I need to get the date (TODAY) from the system... Do you know please which is the correct algorithm to apply ?

 

Thank you so much !!

 

Regards.

2 Replies

  • richie's avatar
    richie
    Community Hero

    Hi,

     

    I'm unsure if I'm understanding correctly - I've got a groovy script that returns the current date that I found somewhere else on the web a while ago

     

    import org.codehaus.groovy.runtime.*;
          
            def dateTime = new Date()
            log.info (DateGroovyMethods.format(dateTime, 'dd/MM/yyyy'))

    Hope this helps, although unsure if it does!

     

    richie