python - Reading DateField with specific format from SQL database using peewee -


i read column of date sql database. however, format of date in database 27-jan-13 day-month-year. when read column using peewee datefield read in format cannot compared later using datetime.date.

can me solve issue?

you need store data in database using format %y-%m-%d. when extract data can present in format like, ensure data sorted correctly (and recognized sqlite date) must use %y-%m-%d format (or unix timestamps if prefer way).


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -