Re: [sqlite] ISO8601 8-byte packed date type

2007-03-08 Thread Tom Olson

I was pretty tires when I wrote the original post and realize that I should
have been more specific.  So here goes!

I have created an 8-byte packed data type that stores date, time and
timezone information.  It has an effective date range of:

-142399-01-01 00:00:00.000 (BCE) through +143027-10-14 08:59:00.991 (CE)

All dates in this range are accurate to 1/1000 of a second

I have helper routines for date arithmetic and converting to/from Julian
dates, UNIX dates and Delphi TDateTime.  There is also a parser for ISO8601
formatted strings for the following formats:

General dates - 2007-03-05 12:34:56.789
Day of Year dates - 2007-365
Week dates - 2007-W51-7

If anyone would find this useful/helpful please let me know.

Tom
tolson at whamware.com


Tom Olson wrote:
> 
> Hello to all,
> 
> I am working on an 8-byte data type that stores date time and timezone
> information and provides helper routines for date arithmatic as well as
> conversion to/from strings, julian dates, UNIX date times, etc...  The
> type can be stored in a 64-bit integer or as an 8 byte blob.  The current
> implementation is in Delphi.  Would anyone be interested in such a
> feature?
> 
> Tom
> 

-- 
View this message in context: 
http://www.nabble.com/ISO8601-8-byte-packed-date-type-tf3364823.html#a9388503
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] ISO8601 8-byte packed date type

2007-03-07 Thread Tom Olson

Hello to all,

I am working on an 8-byte data type that stores date time and timezone
information and provides helper routines for date arithmatic as well as
conversion to/from strings, julian dates, UNIX date times, etc...  The type
can be stored in a 64-bit integer or as an 8 byte blob.  The current
implementation is in Delphi.  Would anyone be interested in such a feature?

Tom
-- 
View this message in context: 
http://www.nabble.com/ISO8601-8-byte-packed-date-type-tf3364823.html#a9361767
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Precision of dates stores as Julian "real"

2007-02-20 Thread Tom Olson

Hello,

I know that SQLite uses a 64-bit floating point type to store Julian date
information.  Is this accurate to the second or a fraction of a second?

I was doing some testing and tried to format a date using strftime() method
with the %f option and I was unable to find a date that kept any millisecond
information and after reviewing the date.c file it does not appear to
capture anything more accurate than a second.  Is this correct?

If I need millisecond information I assume that I should be using the ISO
8601 format and store the dates as text.  Is this correct?

Tom
-- 
View this message in context: 
http://www.nabble.com/Precision-of-dates-stores-as-Julian-%22real%22-tf3264210.html#a9073506
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Does SQLITE support RESEEDing of AUTOINCREMENT fields

2007-02-18 Thread Tom Olson

Hello,

Is there a function or PRAGMA that tells the database engine to recalculate
the next sequence number for an AUTOINCREMENT column of a table (i.e. PRAGMA
reseed('tablename')?

Regards,

Tom
-- 
View this message in context: 
http://www.nabble.com/Does-SQLITE-support-RESEEDing-of-AUTOINCREMENT-fields-tf3249262.html#a9032368
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Question regarding REPLACE INTO and last row ID

2007-02-17 Thread Tom Olson

Hello,

If a REPLACE INTO statement is executed and the there is an existing row
that is replaced will sqlite3_last_inserted_rowid return the rowid of the
record that was changed?
-- 
View this message in context: 
http://www.nabble.com/Question-regarding-REPLACE-INTO-and-last-row-ID-tf3243965.html#a9017825
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-