code: def QA_util_format_date2str(cursor_date):
      
      if isinstance(cursor_date, datetime.datetime):
          cursor_date = str(cursor_date)[:10]
      elif isinstance(cursor_date, str):
          try:
              cursor_date = str(pd.Timestamp(cursor_date))[:10]
          except:
              raise ValueError('请输入正确的日期格式, 建议 "%Y-%m-%d"')
      elif isinstance(cursor_date, int):
          cursor_date = str(pd.Timestamp("{:<014d}".format(cursor_date)))[:10]
      else:
          raise ValueError('请输入正确的日期格式，建议 "%Y-%m-%d"')
      return cursor_date
docs: 对输入日期进行格式化处理，返回格式为 "%Y-%m-%d" 格式字符串
      支持格式包括:
      1. str: "%Y%m%d" "%Y%m%d%H%M%S", "%Y%m%d %H:%M:%S",
              "%Y-%m-%d", "%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H%M%S"
      2. datetime.datetime
      3. pd.Timestamp
      4. int -> 自动在右边加 0 然后转换，譬如 '20190302093' --> "2019-03-02"
  
      :param cursor_date: str/datetime.datetime/int 日期或时间
      :return: str 返回字符串格式日期