我在lotus notes中有一个datetime列,其值类似于01/02/2019 01:01:01 PM
我需要将数据导出到csv文件中,格式如下:
2019-01-02 13:01:01.000
已尝试在视图中更改列属性,但在导出数据时更改为01/02/2019 01:01:01。
这里AM/PM被忽略了。
请建议一种正确执行此操作的方法。提前谢谢。
发布于 2019-01-03 02:33:48
在视图列中使用此公式,其中DateField是包含日期的字段。
year := @Text(@Year(DateField));
month := @Right("0" + @Text(@Month(DateField)) ; 2);
day := @Right("0" + @Text(@Day(DateField)) ; 2);
hour := @Right("0" + @Text(@Hour(DateField)) ; 2);
minute := @Right("0" + @Text(@Minute(DateField)) ; 2);
second := @Right("0" + @Text(@Second(DateField)) ; 2);
year + "-" + month + "-" + day + " " +
hour + ":" + minute + ":" + second + ".000"这些@Right函数将在需要时用零填充您的值。
https://stackoverflow.com/questions/54005984
复制相似问题