I have a date coming in this format "MM-DD-YYY" from view and i want to save it in datetime format.
I'm trying to convert to datetime format using strftime
but it is recognizing the date in "DD-MM-YYYY" format and therefore whenever my date exceeds 12 my code breaks.Please help.
After debugging i found another issue,the date is not coming when the date exceeds 12,which means if the date is not in "DD-MM-YYYY"fomat, it is not shown in the controller.