I want to convert the current date (in groovy)
def currentDate= new Date()
println currentDate
Tue Dec 30 14:48:00 EST 2014
into (that is hour and minute format) 1448
or 14:48
You can try Date.format
:
new Date().format('HHmm')
new Date().format('HH:mm')
new Date().format('EEE')
- see here: docs.oracle.com/javase/7/docs/api/java/text/…