<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def value(self, value, *args, **kwargs):
 """ Takes a string value and returns the Date based on the format """

        from datetime import datetime
        value = self.obj.value(value, *args, **kwargs)
        try:
            rv = datetime.strptime(value, self.format)
        except ValueError as _:  # noqa
            rv = None
        return rv