With Groovy, you don’t need the includes, and can just do:
String oldDate="04-DEC-2012"
Date date = Date.parse( 'dd-MMM-yyyy', oldDate )
String newDate = date.format( 'M-d-yyyy' )
println newDate
To print:
12-4-2012
With Groovy, you don’t need the includes, and can just do:
String oldDate="04-DEC-2012"
Date date = Date.parse( 'dd-MMM-yyyy', oldDate )
String newDate = date.format( 'M-d-yyyy' )
println newDate
To print:
12-4-2012