从yyyy-mm-dd获得星期几 [英] get day of the week from yyyy-mm-dd

查看:224
本文介绍了从yyyy-mm-dd获得星期几的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将yyyy-mm-dd转换成这样的东西:

I would like to convert a yyyy-mm-dd to something like this:

2009年10月2日,星期六

"Saturday, 2 October 2009"

我还想选择在一周和一个月的日期修改语言(使其可自定义)

I would like also to have the option to modify the language both day of the week and month (make it customizable)

提前感谢;)

推荐答案

假设.NET(从datetime标签):

Assuming .NET (from the datetime tag):

DateTime.Parse("2009-10-02").ToString("D", CultureInfo.CreateSpecificCulture("en"));

这篇关于从yyyy-mm-dd获得星期几的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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