从文本fileld的日期选项中提取星期几 [英] Extracting the day of the week from the date option of a text fileld
问题描述
计划细分
txt_Return_Date.Text = ds.Tables [CURASCH]。行[0] [RETURN_DATE ] .ToString();
txt_Day.Text = txt_Return_Date.Text
需要获取
来自txt_Return_Date.Text的文本的星期几
星期一
星期二
星期三
星期四
< br $>
请提供相应的网络参考资料。 />
我的尝试:
已检查我的代码找到一个无效的例子。
需要一个参考,里面有这个问题的例子
< blockquote>使用TryParse或TryParseExact将其转换为DateTime值,并使用 DateTime.DayOfWeek属性(系统) [ ^ ]获取工作日。
Program segment
txt_Return_Date.Text = ds.Tables["CURASCH"].Rows[0]["RETURN_DATE"].ToString();
txt_Day.Text = txt_Return_Date.Text
Need to get the day of the week for the text filed txt_Day.Text
from "txt_Return_Date.Text"
Monday
Tuesday
Wednesday
Thursday
please provide me with the appropriate web references.
What I have tried:
Checked my codes to find an example to no avail.
Need a reference which has examples on this issue
Convert it to a DateTime value using TryParse or TryParseExact, and use the DateTime.DayOfWeek Property (System)[^] To get the week day.
这篇关于从文本fileld的日期选项中提取星期几的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!