CSV/Excel 的最佳时间戳格式? [英] Best timestamp format for CSV/Excel?
本文介绍了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).
这篇关于CSV/Excel 的最佳时间戳格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文