I've got GregorianCalendar instances and need to use SimpleDateFormat (or maybe something that can be used with calendar but that provides required #fromat() feature) to get needed output. Please, suggest work arounds as good as permanent solutions.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Simply call
calendar.getTime()
and pass the resultingDate
object to theformat
method.Try this:
Calendar.getTime() returns a Date which can be used with SimpleDateFormat.
eQui's answer is missing a step