My objective is a query which lists events and calculates the number of days
to the event e.g:
Name Days to Event
--------- -------------
Christmas 40
The event table might look something like:
create table event (
name varchar (50),
when text (20));
(Regarding storing date values in a text field, I will use whatever datatype
best facilitates the calculation.)
What would an 'insert' statement for this table look like? E.g.
insert into event values ('Christmas', ... );
What would the select statement which calculates the 'Days to Event' column
look like? E.g.
select name, ... from event;
I expect the answer probably involves using 'now' along with converting a
string of the form YYYYMMDD to another form, then possibly converting it
back. To-date my attempts have been unsuccessful.
Hoping someone can help.
Tony
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users