[sqlite] Checks with dates

2016-04-15 Thread Cecil Westerhof
2016-04-15 2:29 GMT+02:00 Keith Medcalf : > > create table x > ( > ds text not null check(date(ds) is not null), > de text not null check(date(de) is not null), > check(ds < de) > ); > ?? > ?? > insert into x values ('2016-04-15', '2016-04-13'); > insert into x values ('2016-04-15', '2016-04

[sqlite] Checks with dates

2016-04-14 Thread Cecil Westerhof
2016-04-14 21:26 GMT+02:00 Richard Hipp : > On 4/14/16, Cecil Westerhof wrote: > > I have a table where I have two fields: toStart and finishBefore. They > are > > both dates and when filled the format should be %Y-%m-%d. How can this be > > checked? 2016-04-31 should not be accepted. > > > > The

[sqlite] Checks with dates

2016-04-14 Thread Cecil Westerhof
I have a table where I have two fields: toStart and finishBefore. They are both dates and when filled the format should be %Y-%m-%d. How can this be checked? 2016-04-31 should not be accepted. The second part is that when both are filled, then finishBefore should be after toStart. Is that possible

[sqlite] Checks with dates

2016-04-14 Thread Keith Medcalf
f Of Cecil Westerhof > Sent: Thursday, 14 April, 2016 16:04 > To: SQLite mailing list > Subject: Re: [sqlite] Checks with dates > > 2016-04-14 21:26 GMT+02:00 Richard Hipp : > > > On 4/14/16, Cecil Westerhof wrote: > > > I have a table where I have two fields: t

[sqlite] Checks with dates

2016-04-14 Thread Richard Hipp
On 4/14/16, Cecil Westerhof wrote: > I have a table where I have two fields: toStart and finishBefore. They are > both dates and when filled the format should be %Y-%m-%d. How can this be > checked? 2016-04-31 should not be accepted. > > The second part is that when both are filled, then finishBef