特定日期格式的日期格式化程序 [英] Date formatter for a certain format of date
本文介绍了特定日期格式的日期格式化程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可能会遗漏一些东西,但不能为日期编写正确的日期格式化程序字符串:
I might missing something, but I can't compose proper date formatter string for the date:
2016-01-14T10:24:26+0000
这里的"T"是什么?以及如何包含时区?
What is 'T' here? and how to include timezone?
我的字符串不起作用:@"yyyy-MM-dd'T'hh:mm:ss Z"
My string does not work: @"yyyy-MM-dd'T'hh:mm:ss Z"
推荐答案
您必须在单引号中使用"T",例如以下格式,以检索日期前后的字符串:
You have to use 'T' in single quotes like below format to retrive string ftom date:
yyyy-MM-dd'T'hh:mm:ssZ
让我知道.
这篇关于特定日期格式的日期格式化程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文