[Answered ]-Using DateTimeField in Django with Oracle

2👍

I found the solution for problem.
Oracle waits format ‘YYYY-MM-DD HH24:MI:SS’, but datetime.datetime.now() returns string like this: u’2013-10-18 05:50:44.332577′.
The solution:

model.filled_date = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
model.save()
👤akozin

Leave a comment