You could just try this and see what happens:
char *ctime(const time_t *timer);
The returned string is in the following format:
DDD MMM dd hh:mm:ss YYYY
You may just be surprised.... or not!
Michael
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kees Nuyt
Sent: Friday, March 13, 2009 2:58 PM
To: [email protected]
Subject: Re: [sqlite] datetime as integer
Just a few corrections.
On Fri, 13 Mar 2009 13:48:46 +0000, "Timothy A. Sawyer"
<[email protected]> 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
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users