That's cuz' the parameters were backwards....should be select distinct datetime(,'%Y',date) as year from data;
The way it was given "date" was being used as the format and %Y as the time value....ergo blank... Michael D. Black Senior Scientist Advanced Analytics Directorate Northrop Grumman Information Systems ________________________________ From: [email protected] on behalf of J. Bobby Lopez Sent: Wed 9/29/2010 11:42 AM To: General Discussion of SQLite Database Subject: EXTERNAL:Re: [sqlite] Getting unique years from a timestamp column This one doesn't seem to return the desired result, instead it returned a blank line? On Wed, Sep 29, 2010 at 12:40 PM, David Bicking <[email protected]> wrote: > How about trying > > select distinct datetime(date,'%Y') as year from data; > > David >
_______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

