Lloyd wrote:
I would like to know one more thing, can I use these date and time
functions with comparison operators? Will they return the correct result
or as per the string comparison rules?
Lloyd,
You can use either the string comparisons with the text versions of the
dates or numeric
Hi,
How can I manage date and time using sqlite? [Do I have to do it
outside sqlite?]
Thanks,
Lloyd.
__
Scanned and protected by Email scanner
-
To unsubscribe, send email to
hi,
i use numeric values and the sqlite date-functions.
example:
create table if not exists online (ip integer primary key, date number)
insert or replace into online values (12345, julianday('now'))
select id, datetime(date, 'localtime') date from online order by
date desc limit 100
Lloyd wrote:
Hi,
How can I manage date and time using sqlite? [Do I have to do it
outside sqlite?]
http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
--
Craig Morrison
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
http://pse.2cah.com
Controlling pseudoephedrine purchases.
Thanks gg and Craig Morrison for your informative reply.
I would like to know one more thing, can I use these date and time
functions with comparison operators? Will they return the correct result
or as per the string comparison rules?
Thanks again,
Lloyd.
On Tue, 2006-11-07 at 04:25 -0500,
.
YMMV. My apps are all web-based, and I frequently need to look at stored data
using ad-hoc queries.
-Clark
- Original Message
From: Lloyd [EMAIL PROTECTED]
To: sqlite-users@sqlite.org
Sent: Tuesday, November 7, 2006 2:30:34 AM
Subject: Re: [sqlite] Date data type
Thanks gg and Craig
On Tue, 7 Nov 2006, Me wrote:
-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] (
Lloyd wrote:
Thanks gg and Craig Morrison for your informative reply.
I would like to know one more thing, can I use these date and time
functions with comparison operators? Will they return the correct result
or as per the string comparison rules?
Same rules apply, if it smells like a