Skip to content

Instantly share code, notes, and snippets.

@amay077
Created April 15, 2013 10:33
Show Gist options
  • Save amay077/5387211 to your computer and use it in GitHub Desktop.
Save amay077/5387211 to your computer and use it in GitHub Desktop.
DateFormat.format では HH:mm が使えない ref: http://qiita.com/items/b33603b958a4d0eedc8a
long t = System.currentTimeMillis();
Log.d("By DateFormat", DateFormat.format("HH:mm", t).toString());
Log.d("By SimpleDateFormat", new SimpleDateFormat("HH:mm").format(new Date(t)));
04-09 22:42:14.435: D/By DateFormat(2860): HH:42 ←あ〜あ
04-09 22:42:14.435: D/By SimpleDateFormat(2860): 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment