java - How to convert long to datetime in android -


this question has answer here:

datetime value in long variable need convert format 2014-04-06t12:04:23.000z simplest approach.

try way,

android

simpledateformat sdf = new simpledateformat("yyyy-mm-dd't'hh:mm:ss.sssz", locale.us);  system.out.format("%30s %s\n", "yyyy-mm-dd't'hh:mm:ss.sssz", sdf.format(new date(0))); // 0 - "longvalue" 

result

yyyy-mm-dd't'hh:mm:ss.sssz 1970-01-01t00:00:00.000 

great android doc simpledateformat


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -