0

I have a question about django admin import file. my excel data include DateTime data like 2010/10/10 13:10 , i want to import it into mysql by django admin. I used DateTimeField in models. What is the time data format? how to do this?

JLOGAN
  • 43
  • 11

2 Answers2

0

that function is natural from python, just stablish the format of incoming string date and do the following

https://stackoverflow.com/a/24228410/2946222

or

https://stackoverflow.com/a/8636887/2946222

NanNanX
  • 1
  • 1
0

[https://django-import-export.readthedocs.io/en/latest/api_widgets.html#import_export.widgets.DateTimeWidget][1]

This can work, just use settings.DATETIME_INPUT_FORMATS

JLOGAN
  • 43
  • 11