how to retrieve day month and year from Timestamp(long format)

后端 未结 5 1040
再見小時候
再見小時候 2020-12-15 17:38

I need to retrieve day year and month from a timestamp object as long numbers:

public long getTimeStampDay()
    {

            String iDate = new SimpleDate         


        
5条回答
  •  不知归路
    2020-12-15 18:24

    I found a simple way to do that:

    born_date.getDay();
    born_date.getMonth();
    born_date.getYear();
    

    even if method getDay getMonth and getYear are deprecated. I think that Bozho solution is the best one.

提交回复
热议问题