L
lightning
I found that standard jdbc api does not have a very convenient way to
deal with datetime.
So I use it in this way:
DateFormat df =
DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG,
Locale.CHINA);
DateFormat dfp =
DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM,
Locale.CHINA);
String output=df.format(dfp.parse(rs.getString("time")));
Is this the best practice ?
deal with datetime.
So I use it in this way:
DateFormat df =
DateFormat.getDateTimeInstance(DateFormat.LONG,DateFormat.LONG,
Locale.CHINA);
DateFormat dfp =
DateFormat.getDateTimeInstance(DateFormat.MEDIUM,DateFormat.MEDIUM,
Locale.CHINA);
String output=df.format(dfp.parse(rs.getString("time")));
Is this the best practice ?