def strpdate(string, format):
 whence = datetime.strptime(string, format)
 return whence.date()

def strpdate ( string , format ) : whence = datetime . strptime ( string , format ) return whence . date ( )
parse the date string according to the format in format .