For now the output of convertedDate will be Tue Feb 05 00:00:00 MEZ 2013.
There's no "output of convertedDate
" - it's just a Date
variable. The only way to get "Tue Feb 05 00:00:00 MEZ 2013" would be to call toString()
on it, either implicitly or explicitly - and you can't change the format used by Date.toString()
.
It's important to understand that a Date
is just a number of milliseconds since the Unix epoch. It doesn't have a time zone; it doesn't have a calendar system; it doesn't have a particular format.
If you want a better API which allows you to create an object which just represents a date (rather than a date/time) you should look at Joda Time which is a far nicer date and time API than the built-in one. It's reasonably large - primarily due to the time zone data, I believe - so you may want to look for a cut down version tailored to Android. It's mostly a pleasure to work with though - at least compared with Date
and Calendar
.