Groovy web console

subscribe to the feed Subscribe
to this
site
For Tobia (via #groovywebconsole)
tweet this snippet Tweet
this
script

For Tobia

Published 6 months ago by Gab
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts


def formatDate(String toConvert){ 
    Date date = Date.parse( 'dd-MMM-yyyy', toConvert) 
    String newDate = date.format( 'yyyyMMdd' )
    return newDate;
}

println formatDate('02-12-2017');