You could of course just try this and see what happens:

-----Original Message-----
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kees Nuyt
Sent: Friday, March 13, 2009 2:58 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] datetime as integer

Just a few corrections.

On Fri, 13 Mar 2009 13:48:46 +0000, "Timothy A. Sawyer"
<tsaw...@mybowlingdiary.com> wrote:

>To be able to do this you need the following data points:
>
>1. What is the integer representation of the date? 
>   Is it days or seconds from a certain date? 
>   Keep in mind that 1 day = 86400 seconds = 3600 minutes

Uhm, that's 1440 minutes.

>Most date representations are stored as seconds 
>since 1-1-1970 depending on the underlying OS
>
>2. Once you have figured out #1 then you need to perform
>   a function to convert that value to a SQLite date which
>   is stored as DD-MM-YYYY (or MM-DD-YYYY). 

SQLite accepts/recognizes date strings in the international
standard form: YYY-MM-DD HH:MM:SS (ISO-8601) and a few close
derivatives:
http://www.sqlite.org/lang_datefunc.html
http://en.wikipedia.org/wiki/ISO_8601

For date calculations, SQLite prefers real values containing
number of days since noon in Greenwich on November 24, 4714
B.C., using the Proleptic Gregorian calendar:
http://www.sqlite.org/lang_datefunc.html
http://en.wikipedia.org/wiki/Gregorian_calendar
http://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar
-- 
  (  Kees Nuyt
  )
c[_]
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to