django postgres datetime field to python datetime -



django postgres datetime field to python datetime -

i have next model class

class transaction(models.model): quantity = models.integerfield(default=0) sell_time = models.datetimefield()

when fetch "sell_time" model, getting datetime in next format

2014-10-01 08:09:46.251563+00:00

my question is, if not in format like

year-month-day hour:minutes:seconds

how can convert python datetime object like

datetime.datetime(2014, 10, 1, 08, 09, 46, 540535)

many thanks

did print it? if print datetime object, serialized string datetime. can utilize other datetime.

python django postgresql datetime

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -