That is more of a general Java question.
Calendar cal = new GregorianCalendar();
// Get the components of the date
int era = cal.get(Calendar.ERA); // 0=BC, 1=AD
int year = cal.get(Calendar.YEAR); // 2008
int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
int day = cal.get(Calendar.DAY_OF_MONTH); // 1...
int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK); // 1=Sunday,
2=Monday, ...
Formatter formatter = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss");
String dateFormatted = formatter.format(date);
// Mon, 29 Sept 2008 08:44:00
Official Docs:
http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
On Sep 29, 7:56 am, Wesley Sagittarius <[EMAIL PROTECTED]> wrote:
> hi,
>
> how can I get actual Date???
> any idea??
>
> Wesley.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---