1. It looks like you have superfluous quotes around the dates. That's probably 
your issue.

2. Try "select distinct dttm from foo LIMIT 10;"

On 3/22/18, 8:47 AM, "sqlite-users on behalf of Ron Watkins" 
<sqlite-users-boun...@mailinglists.sqlite.org on behalf of rwa...@gmail.com> 
wrote:
    sqlite> select distinct dttm from foo;
    
    …  (lots of records)
    
    '2018-03-22 06:25:01'
    
    '2018-03-22 06:26:01'
    
    '2018-03-22 06:27:01'
    
    '2018-03-22 06:28:01'
    
    '2018-03-22 06:29:01'
    
    '2018-03-22 06:30:01'
    
    '2018-03-22 06:31:01'
    
    '2018-03-22 06:32:02'
    
    '2018-03-22 06:33:01'
    
    '2018-03-22 06:34:01'
    
    '2018-03-22 06:35:01'
    
    '2018-03-22 06:36:01'
    
    '2018-03-22 06:37:01'
    
    '2018-03-22 06:38:01'
    
    '2018-03-22 06:39:01'
    
    '2018-03-22 06:40:01'
    
    '2018-03-22 06:41:01'
    
    '2018-03-22 06:42:01'
    
    '2018-03-22 06:43:01'
    
    '2018-03-22 06:44:01'
    
    sqlite>
    
     
    
    BTW, is there some equilivant to “select top 10 * from foo;” style to 
reduce the number of records? I tried this “top 10” but it’s apparently  not 
supported.
    
     
    
    -----Original Message-----
    From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of Peter Da Silva
    Sent: Thursday, March 22, 2018 6:33 AM
    To: SQLite mailing list
    Subject: Re: [sqlite] How to convert a datetime column to a date?
    
     
    
    It might be helpful to provide some examples of what you have in those 
DATETIME columns.    
    
     
    
    _______________________________________________
    
    sqlite-users mailing list
    
     <mailto:sqlite-users@mailinglists.sqlite.org> 
sqlite-users@mailinglists.sqlite.org
    
     <http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users> 
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
    
    _______________________________________________
    sqlite-users mailing list
    sqlite-users@mailinglists.sqlite.org
    http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
    

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to