code: def get_datetime(strings: Sequence[str],
                   prefix: str,
                   datetime_format_string: str,
                   ignoreleadingcolon: bool = False,
                   precedingline: str = "") -> Optional[datetime.datetime]:
      
      x = get_string(strings, prefix, ignoreleadingcolon=ignoreleadingcolon,
                     precedingline=precedingline)
      if len(x) == 0:
          return None
      # For the format strings you can pass to datetime.datetime.strptime, see
      # http://docs.python.org/library/datetime.html
      # A typical one is "%d-%b-%Y (%H:%M:%S)"
      d = datetime.datetime.strptime(x, datetime_format_string)
      return d
docs: Fetches a ``datetime.datetime`` parameter via :func:`get_string`.