Date format error in Sales/Purchase Bulk order import

While trying to Bulk Import Sales Order , I get an issue with the date format . In which format should the date be put in excel sheet ?
As of now I’m using “2020-05-31” , I also tried indian format as well , but of no use .

Traceback (most recent call last):
File “/home/rushabh/frappe-bench/env/lib/python3.6/site-packages/dateutil/parser/_parser.py”, line 655, in parse
ret = self._build_naive(res, default)
File “/home/rushabh/frappe-bench/env/lib/python3.6/site-packages/dateutil/parser/_parser.py”, line 1238, in _build_naive
if cday > monthrange(cyear, cmonth)[1]:
File “/usr/lib/python3.6/calendar.py”, line 124, in monthrange
day1 = weekday(year, month, 1)
File “/usr/lib/python3.6/calendar.py”, line 116, in weekday
return datetime.date(year, month, day).weekday()
ValueError: year 43954 is out of range

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/home/rushabh/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer_new.py”, line 484, in import_data
doc = self.process_doc(doc)
File “/home/rushabh/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer_new.py”, line 777, in process_doc
return self.insert_record(doc)
File “/home/rushabh/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer_new.py”, line 788, in insert_record
new_doc.insert()
File “/home/rushabh/frappe-bench/apps/frappe/frappe/model/document.py”, line 231, in insert
self.run_before_save_methods()
File “/home/rushabh/frappe-bench/apps/frappe/frappe/model/document.py”, line 915, in run_before_save_methods
self.run_method(“validate”)
File “/home/rushabh/frappe-bench/apps/frappe/frappe/model/document.py”, line 816, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/rushabh/frappe-bench/apps/frappe/frappe/model/document.py”, line 1102, in composer
return composed(self, method, *args, **kwargs)
File “/home/rushabh/frappe-bench/apps/frappe/frappe/model/document.py”, line 1085, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/rushabh/frappe-bench/apps/frappe/frappe/model/document.py”, line 810, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/rushabh/frappe-bench/apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py”, line 36, in validate
super(SalesOrder, self).validate()
File “/home/rushabh/frappe-bench/apps/erpnext/erpnext/controllers/selling_controller.py”, line 39, in validate
super(SellingController, self).validate()
File “/home/rushabh/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py”, line 21, in validate
super(StockController, self).validate()
File “/home/rushabh/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 84, in validate
self.validate_all_documents_schedule()
File “/home/rushabh/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 137, in validate_all_documents_schedule
self.validate_non_invoice_documents_schedule()
File “/home/rushabh/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 130, in validate_non_invoice_documents_schedule
self.validate_payment_schedule_dates()
File “/home/rushabh/frappe-bench/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 839, in validate_payment_schedule_dates
if self.doctype == “Sales Order” and getdate(d.due_date) < getdate(self.transaction_date):
File “/home/rushabh/frappe-bench/apps/frappe/frappe/utils/data.py”, line 42, in getdate
return parser.parse(string_date).date()
File “/home/rushabh/frappe-bench/env/lib/python3.6/site-packages/dateutil/parser/_parser.py”, line 1374, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File “/home/rushabh/frappe-bench/env/lib/python3.6/site-packages/dateutil/parser/_parser.py”, line 657, in parse
six.raise_from(ParserError(e.args[0] + “: %s”, timestr), e)
File “”, line 3, in raise_from
dateutil.parser._parser.ParserError: year 43954 is out of range: 43954.0

The format is highlighted on the import template itself:

In that format also , the date gets converted to a number .Also I’m using the beta version of data Import FYI .

If you’re using Beta, on import, the system shows you the preview after attaching the import sheet:

The format is picked up from the one in your system settings:

Are you downloading the CSV or the Excel format for the template?

I’m using the excel format , and yeah I go by the preview format but still the date gets converted to an integer .

Using any permutation possible , the date still gets converted to an integer

Can you post at what point this is happening?

Just tried the data import beta with both CSV and Excel templates. These were working fine:

This happens when I click on ‘Start Import’ in the system .

Try to put the date format reversed as below:
yyyy-mm-dd
not as it shows in the template
dd-mm-yyyy
I did this and it was solved for me. because it used to think that the day is the year, and whenever you give it:
30-6-2020
it will think it is
20-6-2030.