无法在文本框中检索日期 [英] Unable to retrieve date in textbox

查看:110
本文介绍了无法在文本框中检索日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







我想在数据库中输入日期我正在使用TextMode Date this show me calendar to input date,



我在文本框日期检索日期时遇到问题无法显示请帮助我当我删除Textmode Date工作时,

Hi


I want to enter a date in database I am using TextMode Date this Show me calendar to enter date ,

I am facing Issue at a time of retrieving Date in textbox date cant be shown Please help me When I remove Textmode Date it work,

推荐答案

尝试将值转换为yyyy-MM-dd格式,然后将其分配给Joining_Date_TextBox文本框。
try converting the value to "yyyy-MM-dd" format and then assign it to Joining_Date_TextBox textbox.


HI Malhotra,



这个在文本框中使用textchangeevent并使用autopostback = true然后在textchangeevent中你可以找到所选日期的文本。



谢谢
HI Malhotra,

for this use textchangeevent in textbox and use autopostback=true then in textchangeevent you can find the text of selected date.

Thanks


Joining_Date_TextBox.Text = Convert.ToDateTime(dt.Rows [0] [Employee_Joining_Date]。ToString(yyyy-MM-dd);
Joining_Date_TextBox.Text = Convert.ToDateTime(dt.Rows[0]["Employee_Joining_Date"].ToString("yyyy-MM-dd");


这篇关于无法在文本框中检索日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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