Re: date in format yy-mm-dd hh:mm
- From: Thomas Fritsch <i.dont.like.spam@xxxxxxxxxxx>
- Date: Fri, 26 Jan 2007 18:29:05 GMT
Sigi wrote:
I have a Date object, and I need to obtain it in a human readable format.DateFormat dateFormat = new SimpleDateFormat("yy-MM-DD HH:mm");
If I use date.toString(), it gives:
Fri Jan 26 17:47:57 CET 2007
What can I do to obtain it in the
07-01-26 17:47
format?
// You'll find more info about the pattern strings
// in the API doc of SimpleDateFormat
Date date = ...;
String s = dateFormat.format(date);
--
Thomas
.
- References:
- date in format yy-mm-dd hh:mm
- From: Sigi
- date in format yy-mm-dd hh:mm
- Prev by Date: Software Developer Lead for New Mobile Device Product
- Next by Date: How to move inputStream back to the first line?
- Previous by thread: Re: date in format yy-mm-dd hh:mm
- Next by thread: Solutions Architect for New Mobile Device Product
- Index(es):