请帮助解决问题。
我从数据库中获取日期 view.py:
entry = Comment.objects.create(
user_id=user_id,
comment=comment,
video_id=video_id,
)
date = str(entry.date)
print(date)
结果输出到控制台:
09/11/2014 20: 31: 17.988723
但我需要:
09/11/2014 20:31:17
或:
2014-11-09 20:31:17