Hello.
I would like to convert a TIMESTAMP into date thanks to a trigger. I tried
with strftime but it doesn't work (see below). Is there an other solution
?
------------------------------------------------
I have a table like this :
CREATE TABLE contrat(UniqueID INTEGER PRIMARY KEY, tstp TIMESTAMP NOT
NULL, date1 DATE NULL);
I have created a trigger that puts in date1 the date conversion of tstp :
CREATE TRIGGER tstpTOdate1 AFTER INSERT ON contrat
BEGIN
UPDATE contrat SET date1=strftime("%d-%m-%Y", new.tstp) WHERE
UniqueID=new.UniqueID;
END;
But when strftime doesn't seem to work :
>INSERT INTO contrat(tstp) VALUES("1184834152");
>SELECT * FROM contrat;
1|1184834152|16-08-3239253
-------------------------------------------------
Thank you,
Charly CAULET
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------