上传的图像用于项目: 'CST技术支持'
  1. CST技术支持
  2. SLAL2-1732

上海日邮-接口增加预处理脚本将yyyy-mm-dd转为char类型的yyyy-mm

XMLWord打印

    • Icon: 技术问题 技术问题
    • 解决结果: 完成
    • Icon: Block Block
    • 202101
    • R-日邮物流-Y2020007
    • YLCNTEST
    • 基础通用功能
    • 隐藏

      感谢

      if data:
      header = data[0]
      adjust_payroll_period_date_index = header.index('adjust_payroll_period_date')
      for index, line in enumerate(data):
      if index == 0:
      continue
      adjust_payroll_period_date = line[adjust_payroll_period_date_index]
      if not (adjust_payroll_period_date and '/Date(' in adjust_payroll_period_date):
      continue
      adjust_payroll_period_date = adjust_payroll_period_date.split('+')[0].split('(')[1].split(')')[0]
      adjust_payroll_period_date = (int(adjust_payroll_period_date) / 1000)
      adjust_payroll_period_date = datetime.fromtimestamp(adjust_payroll_period_date)
      adjust_payroll_period_date = adjust_payroll_period_date.strftime('%Y-%m')
      line[adjust_payroll_period_date_index] = adjust_payroll_period_date

      显示
      感谢 if data: header = data [0] adjust_payroll_period_date_index = header.index('adjust_payroll_period_date') for index, line in enumerate(data): if index == 0: continue adjust_payroll_period_date = line [adjust_payroll_period_date_index] if not (adjust_payroll_period_date and '/Date(' in adjust_payroll_period_date): continue adjust_payroll_period_date = adjust_payroll_period_date.split('+') [0] .split('(') [1] .split(')') [0] adjust_payroll_period_date = (int(adjust_payroll_period_date) / 1000) adjust_payroll_period_date = datetime.fromtimestamp(adjust_payroll_period_date) adjust_payroll_period_date = adjust_payroll_period_date.strftime('%Y-%m') line [adjust_payroll_period_date_index] = adjust_payroll_period_date

      如题,接口字段做预处理

            wenqiang.liu 刘文强
            zhengl01 郑磊
            表决:
            0 为这个问题表决

              创建日期:
              已更新:
              已解决: