Function:
System.currenttimemillis ();
Function: Produces a current millisecond, which is actually the number of milliseconds since 0 o'clock January 1, 1970, and date () is actually the equivalent of date (System.currenttimemillis ());
Because the date class has a constructed date (long date), it is used to calculate the millisecond difference between long and January 1, 1970.
This is the number of milliseconds, and the result of using the function calendar is the month, day, and seconds.
System.currenttimemillis ();
Obtained is the time distance from 1970-1-01 00:00:00.000 to the current moment, the type is long
string.valueof (System.currenttimemillis ()) This statement can be converted to the following pattern:
Long ct = System.currenttimemillis ();
String t = string.valueof (CT);
In fact, the above string T is equivalent to ct+ "", just into the string format.
Public String refformatnowdate () { date nowtime = new Date (System.currenttimemillis ()); SimpleDateFormat sdformatter = new SimpleDateFormat ("Yyyy-mm-dd"); String retstrformatnowdate = Sdformatter.format (nowtime); return retstrformatnowdate;}
Android in System.currenttimemillis ()