def getDateTimeFromGet(request,key):
if request.GET.get(key,'<STR_LIT>'):<EOL><INDENT>try:<EOL><INDENT>return ensure_timezone(datetime.strptime(unquote(request.GET.get(key,'<STR_LIT>')),'<STR_LIT>'))<EOL><DEDENT>except (ValueError, TypeError):<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return None<EOL>
This function just parses the request GET data for the requested key,
and returns it in datetime format, returning none if the key is not
available or is in incorrect format.