But the strftime() function is supposed to work with whatever format I give it, 
isn't it?  According to the documentation, %d is a two-digit day, %m is a 
two-digit month, and so on.   Is there truly no way to convert my original 
string into a datetime object?

RobR

-----Original Message-----
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of Richard Hipp
Sent: Wednesday, March 08, 2017 2:28 PM
To: SQLite mailing list
Subject: Re: [sqlite] Why isn't my time formatting working?

On 3/8/17, Rob Richardson <rdrichard...@rad-con.com> wrote:
> Hello!
>
> I have a table with times stored as strings.  I massaged them into a 
> form that strftime() should be able to work with, but it's not 
> working.  Here's a little query using the string as it is currently formatted:
>
> select strftime('%d/%m/%Y %H:%M:%S', '03/07/2017 13:06:03')

SQLite uses ISO-8601 dates:  YYYY-MM-DD
--
D. Richard Hipp
d...@sqlite.org
_______________________________________________
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