Dennis Cote wrote: > Emmanuel, > > Check out the functions on this page > http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions > > In particular the function julianday(datestring) will return a julian > day number for a suitably formatted date string. The supported date > formats are from ISO-8601, or YYYY-MM-DD, so you will have to use > substr and concatenation (||) to rearrange your dates. > > HTH > Dennis Cote
Thanks Denis this was a very good suggestion. Here is the part of my query that converts "DD/MM/YYYY" to "YYYY-MM-DD", it works like a charm with julianday() substr(c.value,-4,4) || "-" || (CASE WHEN substr(c.value,-7,1) = '/' THEN "0" || substr(c.value,-6,1) ELSE substr(c.value,-7,2) END) || "-" || (CASE WHEN substr(c.value,2,1) = '/' THEN "0" || substr(c.value,1,1) ELSE substr(c.value,1,2) END) ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------