星期几,获取当天的名字 [英] day of the week, get the name of the day

查看:60
本文介绍了星期几,获取当天的名字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示给定日期的日期名称?我该怎么用?



例如2013年2月14日=星期二

解决方案

使用



 DateTime.Now.DayOfWeek.ToString(); 


试试这个:

  string  day = DateTime.Now.DayOfWeek.ToString(); 
Console.WriteLine(day);



更多详情:获取日期的日期名称 [ ^


i want to display the name of the day for the given date? what should i use?

eg 14 feb 2013 = Thuesday

解决方案

use

DateTime.Now.DayOfWeek.ToString();


Try this:

string day = DateTime.Now.DayOfWeek.ToString();
Console.WriteLine(day);


More details: Getting the Day Name for a Date[^]


这篇关于星期几,获取当天的名字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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