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 - how to insert the date value in sqlite?

how to insert the date value in sqlite?

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

how to insert the date value in sqlite?

Postby androidbase » Fri Feb 05, 2010 1:04 pm

hey,

i am working on data manipulation using sqlite.

how can i insert the datetime value in sqlite

i implemented the below code in my app.

it works,

DateFormat formatter = new SimpleDateFormat("dd MMM yyyy hh:mm:ss");
String temp=property.getFirstChild().getNodeValue();
Date s=formatter.parse(temp.substring(5, temp.length()-5));
String pubdate= formatter.format(s);

but i cant sort by date :cry: :cry: :cry: :cry: :cry: :cry:

help help help :idea: :idea: :idea:
androidbase
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Sat Jan 16, 2010 1:41 pm

Top

Postby appforce » Sun Feb 07, 2010 10:31 pm

Hi,

Use Date.getTime() to get UNIX milliseconds time. It's great for storing in database, and for retrieve too - Date has a constructor that gets milliseconds.


Android developers
appforce
Experienced Developer
Experienced Developer
 
Posts: 60
Joined: Mon Nov 23, 2009 8:28 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 5 guests