get the right Month format date java

前端 未结 2 787
鱼传尺愫
鱼传尺愫 2021-01-27 06:25

can any help, how to get the right date from an String like this \"2014-01-10T09:41:16.000+0000\" my code is:

    String strDate = \"2014-01-10T09:41:16.000+0000         


        
2条回答
  •  天命终不由人
    2021-01-27 07:11

    The documentation states:

    java.util.Calendar.MONTH

    MONTH public static final int MONTH Field number for get and set indicating the month. This is a calendar-specific value. The first month of the year in the Gregorian and Julian calendars is JANUARY which is 0; the last depends on the number of months in a year.

    -> Counting starts at 0 for Calendar.MONTH

提交回复
热议问题