utc_offset转换自“-hhmm”到“-hh:mm:ss” [英] utc_offset conversion from "-hhmm" to "-hh:mm:ss"
本文介绍了utc_offset转换自“-hhmm”到“-hh:mm:ss”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我需要帮助将以-hhmm格式指定的UTC偏移转换为-hh:mm:ss格式。例如,如果我的UTC偏移量为-0530,则输出格式应为-05:30:00
谢谢
Hi guys,
I need help converting an UTC offset specified in the format "-hhmm" to "-hh:mm:ss" format. for Example, if my UTC offset is "-0530", the output format should be "-05:30:00"
Thanks
推荐答案
最后只输出一个00,因为你几秒钟内没有任何信息。
哦,我知道了。我假设你是字符串混搭,所以使用Substring方法获取你需要的部分并插入你需要的:和:00。
Just output a :00 at the end, given that you don''t have any info for seconds.
Oh, I see. I assume you''re string mashing, so use the Substring method to get the parts you need and insert the : and :00 you need.
这篇关于utc_offset转换自“-hhmm”到“-hh:mm:ss”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文