Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - reading date and time from device

reading date and time from device

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

reading date and time from device

Postby sk.android » Wed Jul 22, 2009 12:52 pm

Hi friends,
can anyone please tell me how can we read date and time from device.
Thanks in advance
sk
sk.android
Freshman
Freshman
 
Posts: 2
Joined: Wed Jul 22, 2009 11:45 am

Top

Postby mathuin » Thu Jul 23, 2009 2:01 am

I use java.util.Calendar to do that. It's really easy to use.

I get the current date and time with a line like this:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. Calendar now = Calendar.getInstance();
Parsed in 0.011 seconds, using GeSHi 1.0.8.4


I can access the minutes with something like this:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. int minutes = now.get(Calendar.MINUTES);
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


Hope that helps!
mathuin
Junior Developer
Junior Developer
 
Posts: 15
Joined: Wed Jul 15, 2009 3:10 am

reading date and time

Postby sk.android » Thu Jul 23, 2009 8:10 am

Thanks for response.
sk.android
Freshman
Freshman
 
Posts: 2
Joined: Wed Jul 22, 2009 11:45 am

Top

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests