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
Post a Comment