Hi,
I have some custom code running where I am validating attendance, now I have some datetime fields for attendance doctype. The problem is that when I am importing the attendance via Data Import tool, then the system is considering the data entered as datetime whereas when I enter the data manually in the form the server is getting a unicode.
Here is code for validating which is causing problem
and
Now if I convert the datetime fields via datetime.strptime
then the import via data import fails since the field are considered as datetime
and we cannot convert datetime
via this command. Now if I remove the datetime.strptime converstion then the manual entry on the form would give me an error like
TypeError: can't compare datetime.date to unicode
Can anyone help me as to how to remove this ambiguity in the system or is there a trick during import that I am missing.