日付・文字列変換
ToString.java
//日付型を文字列へ
String nowDateString = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
ToDate.java
//文字列を日付型へ
Date birthDate = DateTimeFormat.getFormat("yyyy-MM-dd").parse("2015-03-23");
Go to list of users who liked
More than 5 years have passed since last update.
日付・文字列変換
//日付型を文字列へ
String nowDateString = DateTimeFormat.getFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
//文字列を日付型へ
Date birthDate = DateTimeFormat.getFormat("yyyy-MM-dd").parse("2015-03-23");
Register as a new user and use Qiita more conveniently
Go to list of users who liked