Please i have been trying hours for this:
        
try:
                datetime.strptime(date, '%d m% %Y')
                date = date.strftime('%Y-%m-%d')
        except:
                print( "<h2>date not propetly entered." )
                sys.exit(0)
===========================

the user enters 21 02 2013

a) i just need to check if its in accepted format
b) then truncate the given date to mysql format

That's all i want to do and i cant make it work. Plese tell me how to write 
this.

I have tried anything i can think of.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to