On Tue, 7 Nov 2006, Me wrote: > YYYY-MM-DD HH:MM:SS > behaves as expected on queries > no manipulation necessary > > you can set a validation mask > CREATE TABLE [tEnforceTimestamp2] ( > [cTimestamp] TEXT CHECK (cTimestamp LIKE'____-__-__ __:__:__') > ) > or > CREATE TABLE [tEnforceTimestamp2] ( > [cTimestamp] TEXT CHECK(cTimestamp > '1900-01-01' AND cTimestamp < > '2099-01-01' AND cTimestamp LIKE'____-__-__ __:__:__') > ) >
In keeping with the spirit of D.R. Hipp's "blessing", and specifically for those who use Tcl/SQLite, but hopefully not limited to those, I've released an old (ie: well used) relatively portable C library of Julian date routines, and a Tcl binding for it under an open source license. Man pages are provided for the Tcl bindings, and but the C source will have to suffice for the C library documentation. The makefile cross builds the .dll using MingW32 (though I have not tested that .dll in quite some time), and builds both the Julian.DLL and Julian.so files for both Windows and most Unix like variants. It will require a reasonably recent version of gnu make, and some twiddling to get working right on your platform, unless you use FreeBSD, and then it should just work. While admittedly, this is not a panacea for the problems expressed in this thread, and is not a SQLite datatype extension, it may prove to be of some small utility to some subset of users. http://www.controlq.com/OpenSource/Tcl_Julian.tgz Enjoy. Rob Sciuk ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------