简体   繁体   English

将RFC日期转换为短日期mm / dd / yyyy

[英]Convert RFC date to short date mm/dd/yyyy

I need to convert an RFC 822 formatted date into the short date format of mm/dd/yyyy using VB.net. 我需要使用VB.net将RFC 822格式的日期转换为mm / dd / yyyy的短日期格式。 I have a web application that I cannot change the source code for. 我有一个无法更改其源代码的Web应用程序。 The web application allows an RSS feed to be sorted by month and year. Web应用程序允许RSS提要按月份和年份进行排序。

Would appreciate any advice or assistance. 希望得到任何建议或帮助。

使用Date.TryParse将字符串转换为Date值,然后将Date.ToString与自定义格式字符串一起使用,以所需的方式设置格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM