2016-04-14 21:26 GMT+02:00 Richard Hipp <drh at sqlite.org>:

> On 4/14/16, Cecil Westerhof <cldwesterhof at gmail.com> 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 finishBefore should be
> > after toStart. Is that possible to check?
>
> Untested:
>
>     CHECK( toStart=date(toStart)
>         AND finishBefore=date(finishBefore)
>         AND finishBefore>toStart )
>

?Does not work, but I have something to play with. ;-)

-- 
Cecil Westerhof

Reply via email to