如何从格式“Thu Jun 09 2011 00:00:00 GMT + 0530(印度标准时间)”转换时间。到mm / dd / yyyy fomat [英] How can I convert the time from the format "Thu Jun 09 2011 00:00:00 GMT+0530 (India Standard Time)" to mm/dd/yyyy fomat

查看:306
本文介绍了如何从格式“Thu Jun 09 2011 00:00:00 GMT + 0530(印度标准时间)”转换时间。到mm / dd / yyyy fomat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,





如何从格式Thu Jun 09 2011 00:00:00 GMT转换时间+0530(印度标准时间)到mm / dd / yyyy HH:MM:SS格式在C#



谢谢

解决方案

DateTime.Now.ToString(MM / dd / yyyy hh:mm:ss);


你可以使用DataFormatString 。 Thu Jun 09 2011 00:00:00 GMT + 0530(印度标准时间)使用完整日期/时间模式(长时间){0:F}显示。您需要的是可排序日期/时间模式{0:s} /短时间模式{0:t}。


Convert.ToDateTime(THU JUN 09 2011 00:00:00)。ToString(MM / dd / yyyy hh:mm.ss );

Hi Friends,


How can I convert the time from the format "Thu Jun 09 2011 00:00:00 GMT+0530 (India Standard Time)" to mm/dd/yyyy HH:MM:SS format in C#

Thank you

解决方案

DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss");


you can make use of DataFormatString. Thu Jun 09 2011 00:00:00 GMT+0530 (India Standard Time) is displayed using Full date/time pattern (long time){0:F}.What you need is Sortable date/time pattern {0:s}/Short time pattern {0:t}.


Convert.ToDateTime("THU JUN 09 2011 00:00:00").ToString("MM/dd/yyyy hh:mm.ss");


这篇关于如何从格式“Thu Jun 09 2011 00:00:00 GMT + 0530(印度标准时间)”转换时间。到mm / dd / yyyy fomat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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