我正在使用PHP脚本处理excel文档,无法确定PT00H00M00S是什么数据类型/格式,随后我找不到使用正则表达式的方法。 我想将其转换为更标准的时间格式(00:00:00),我无法在谷歌上研究这个,因为我不知道“PT ... S”实际上被称为日期类型/格式。
请帮帮我。
I'm working with excel documents using PHP scripts and cannot determine what data type/format PT00H00M00S is, and subsequently I can't find a way to work with it without using regex. I'd like to convert this into a more standard time format (00:00:00) and I can't research this on google because I don't know what "PT...S" is actually called as a date type/format.
Please help me.
最满意答案
它是ISO 8601持续时间 。
请参阅此简要概述: http : //en.wikipedia.org/wiki/ISO_8601#Durations
许多语言都有可用的工具,包括DateInterval形式的PHP。
It is an ISO 8601 duration.
See this brief overview: http://en.wikipedia.org/wiki/ISO_8601#Durations
Many languages have tools available to work with them, including PHP in the form of DateInterval.
更多推荐
发布评论