def set(self, instance, value, **kw):
if value:<EOL><INDENT>try:<EOL><INDENT>value = DateTime(value)<EOL><DEDENT>except SyntaxError:<EOL><INDENT>logger.warn("<STR_LIT>"<EOL>.format(value))<EOL>return False<EOL><DEDENT><DEDENT>self._set(instance, value, **kw)<EOL>
Converts the value into a DateTime object before setting.