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?

2

2 Answers 2

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

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.