Formatting Timestamps in Java

前端 未结 4 1681
刺人心
刺人心 2020-12-11 00:12

Is there a way to format a UTC time into any arbitrary string format I want in java? Basically I was thinking of having some class take the timestamp and I pass it is strin

4条回答
  •  余生分开走
    2020-12-11 00:28

    The java.text.SimpleDateFormat class provides formatting and parsing for dates in a locale-sensitive manner.

    The javadoc header for SimpleDateFormat is a good source of detailed information. There is also a Java Tutorial with example usages.

提交回复
热议问题