计划细分 txt_Return_Date.Text = ds.Tables [CURASCH]。行[0] [RETURN_DATE ] .ToString(); txt_Day.Text = txt_Return_Date.Text 需要获取 txt_Day.Text 来自txt_Return_Date.Text的文本的星期几 星期一 星期二 星期三 星期四 请提供相应的网络参考资料。 /> 我的尝试: 已检查我的代码找到一个无效的例子。 需要一个参考,里面有这个问题的例子
解决方案使用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的日期选项中提取星期几
发布评论