Reputation: 622
I'm having an awful time trying to format 2014-06-02T15:00:00.000-0700
as HH:mm
I have tried def arrivalTimeFormatted = arrivalTime.format("HH:mm")
with no luck.
Upvotes: 0
Views: 1783
Reputation: 50245
Date.parse( "yyyy-MM-dd'T'HH:mm:ss.SSSX", '2014-06-02T15:00:00.000-0700' )
.format( 'HH:mm' )
Is this what you are looking for?
Upvotes: 1