Lines Matching refs:strptime
728 :ref:`strftime-strptime-behavior`.
737 :ref:`strftime-strptime-behavior`.
1029 .. classmethod:: datetime.strptime(date_string, format)
1036 datetime(*(time.strptime(date_string, format)[0:6]))
1039 can't be parsed by :func:`time.strptime` or if it returns a value which isn't a
1041 :ref:`strftime-strptime-behavior`.
1503 :ref:`strftime-strptime-behavior`.
1512 :ref:`strftime-strptime-behavior`.
1535 >>> # Using datetime.strptime()
1536 >>> dt = datetime.strptime("21/11/06 16:30", "%d/%m/%y %H:%M")
1847 :ref:`strftime-strptime-behavior`.
1856 :ref:`strftime-strptime-behavior`.
2267 .. _strftime-strptime-behavior:
2269 :meth:`strftime` and :meth:`strptime` Behavior
2276 Conversely, the :meth:`datetime.strptime` class method creates a
2281 versus :meth:`strptime`:
2284 | | ``strftime`` | ``strptime`` …
2292 | Signature | ``strftime(format)`` | ``strptime(date_string,…
2296 :meth:`strftime` and :meth:`strptime` Format Codes
2425 with the year and week number directives above. Calling :meth:`strptime` with
2443 For the :meth:`datetime.strptime` class method, the default value is
2447 Using ``datetime.strptime(date_string, format)`` is equivalent to::
2449 datetime(*(time.strptime(date_string, format)[0:6]))
2452 information, which are supported in ``datetime.strptime`` but are discarded by
2453 ``time.strptime``.
2481 The :meth:`strptime` method can parse years in the full [1, 9999] range, but
2493 When used with the :meth:`strptime` method, the ``%p`` directive only affects
2501 When used with the :meth:`strptime` method, the ``%f`` directive
2529 When the ``%z`` directive is provided to the :meth:`strptime` method,
2541 When the ``%z`` directive is provided to the :meth:`strptime` method, an
2546 When used with the :meth:`strptime` method, ``%U`` and ``%W`` are only used
2553 :meth:`strptime` format string. Also note that ``%G`` and ``%Y`` are not
2557 When used with the :meth:`strptime` method, the leading zero is optional
2575 .. [#] Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since ``1900`` is not a leap year.