You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Fetch和Token写入电子表格时,日期格式化语法及显示异常问题求助

使用Fetch和Token写入电子表格时,日期格式化语法及显示异常问题求助

各位好,最近我在研究电子表格的格式配置,目前用Fetch配合Token来写入数据,我的代码片段如下:

rows: [{
  values: [
    {
      userEnteredValue: { numberValue: Math.round(new Date().getTime() / 1000) },
      userEnteredFormat: {
        numberFormat: {
          type: 'DATE', pattern: 'ddd dd hh:mm'
        }
      }
    }
  ],
  fields: 'userEnteredValue, userEnteredFormat'
}]

数据提交成功后,我点击对应的单元格会弹出日历控件,但单元格显示的时间并不是我设置的ddd dd hh:mm格式,反而显示的是 epoch 时间戳,有没有大佬能帮我排查下问题所在呀?

备注:内容来源于stack exchange,提问作者Bret Joseph

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 07:08:02