CSV / Excel的最佳时间戳格式? [英] Best timestamp format for CSV/Excel?

查看:183
本文介绍了CSV / Excel的最佳时间戳格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在写一个CSV文件。我需要写入至少准确到秒,最好是毫秒的时间戳。什么是CSV文件中的时间戳的最佳格式,以便它们可以通过最小的用户干预由Excel准确无误地解析?

I'm writing a CSV file. I need to write timestamps that are accurate at least to the second, and preferably to the millisecond. What's the best format for timestamps in a CSV file such that they can be parsed accurately and unambiguously by Excel with minimal user intervention?

推荐答案

对于第二个精度,yyyy-MM-dd HH:mm:ss应该做的。

For second accuracy, yyyy-MM-dd HH:mm:ss should do the trick.

我相信Excel不是很好,当与COM对象IIRC交互时 - 我会尝试找到一个参考,并在这里张贴)。

I believe Excel is not very good with fractions of a second (loses them when interacting with COM object IIRC - I'll try to find a reference and post it here).

这篇关于CSV / Excel的最佳时间戳格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆