Reputation: 4031
Using the windows shell when i try to query the mmssms.db
like
sqlite> select address, date, body from sms;
it gives me the date in some weird format, how can i get it in proper Date format. Screen shot is attached.
Upvotes: 1
Views: 1607
Reputation: 7491
There is a date(timestring, modifier, modifier, ...) function for sqlite, see here - http://www.sqlite.org/lang_datefunc.html
or the strftime(format, timestring) looks like it would work better
so something like:
sqlite> select address, strftime('%Y-%m-%d %H:%M:%S', date), body from sms;
Upvotes: 2
Reputation: 2134
Looks like a time date stamp. Look into the formatting and casting
This is TSQL specific but the concept is the same if the syntax varies slightly
http://anubhavg.wordpress.com/2009/06/11/how-to-format-datetime-date-in-sql-server-2005/
edit: Not my blog just a link I googled that covered what you are trying to accomplish faster than me typing it out.
edit #2 : Just to be thorough and unbiased, w3schools has a good tutorial on this here:
http://www.w3schools.com/sql/sql_dates.asp
good luck!
Upvotes: 1