Re: [sqlite] Date and time in RFC 822
Wojciech wrote: > I would ask, if there is any possibility to sort data in sqlite tables by > date, which is stores in RFC 822 format. I have data in this format, which > comes from RSS channels - in RSS specification RFC 822 it's required. > > Sample date looks like that: Sat, 07 Sep 2002 00:00:01 GMT > I think you will have to create a custom function that converts your RFC 822 date strings into ISO 8601 date strings. The ISO 8601 strings will be sorted into date order by a simply lexical sort. SELECT MAX(RFC822toISO8601(date_field)) FROM table User defined functions are described at http://www.sqlite.org/capi3.html HTH Dennis Cote ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Date and time in RFC 822
Hi, I would ask, if there is any possibility to sort data in sqlite tables by date, which is stores in RFC 822 format. I have data in this format, which comes from RSS channels - in RSS specification RFC 822 it's required. Sample date looks like that: Sat, 07 Sep 2002 00:00:01 GMT I tried with something like SELECT MAX(date(date_field)) FROM table ...but it isn't working. I readed http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions and searched a couple of web resources, but I didn't find any working solution. Thank You kindly for any help, WK ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users