在NetAdvantage5.1 WEB的WebDateChooser控件中 怎么使其日期显示为如下格式:2006-01-08 昨天刚刚用了NetAdvantage的WebDateChooser,发现他的属性中没日期的格式 ,只能显示文本属性,如this.WebDateChooser1.Text="2006-1-8" 我现在要求this.WebDateChooser1.Text="2006-01-08",不知道怎么转换 请指教! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 自己想了哈 已经实现了 private void WebDateChooser1_ValueChanged(object sender, Infragistics.WebUI.WebSchedule.WebDateChooser.WebDateChooserEventArgs e) { this.Label1.Text=this.WebDateChooser1.Text; //Response.Write(Convert.ToDateTime(this.Label1.Text)); int imonth=0,iday=0; string stryear = "",strmonth="",strday=""; stryear = Convert.ToString(Convert.ToDateTime(this.Label1.Text).Year); imonth = Convert.ToDateTime(this.Label1.Text).Month; iday = Convert.ToDateTime(this.Label1.Text).Day; if (imonth<10) strmonth = "0" + imonth.ToString(); else strmonth = imonth.ToString(); if (iday<10) strday = "0" + iday.ToString(); else strday = iday.ToString(); StartDate = stryear + "-" + strmonth + "-" + strday + " 00:00:00"; Response.Write(StartDate+"<br>"); } 求救:Coolite中gridpanel绑定数据问题 for asp.net ASP.NET与后台程序之间如何交互? 动态生成GridView 关于手机付费 急,帮忙看个正则~~ 求一sql语句....(高手请进) 一个很迷惑的问题,我都不知道怎么形容错误了 分析器错误 未能加载类型“HRb2b_Web.Modify_Product”。 在线请教DataGrid 问题! Asp.net与防火墙的问题 一个关于登陆的问题,急…… 如何获取远程客户端的主机名?为什么在局域网是获得名字,跑到Internet就变成ip了?
{
this.Label1.Text=this.WebDateChooser1.Text;
//Response.Write(Convert.ToDateTime(this.Label1.Text));
int imonth=0,iday=0;
string stryear = "",strmonth="",strday="";
stryear = Convert.ToString(Convert.ToDateTime(this.Label1.Text).Year);
imonth = Convert.ToDateTime(this.Label1.Text).Month;
iday = Convert.ToDateTime(this.Label1.Text).Day;
if (imonth<10)
strmonth = "0" + imonth.ToString();
else
strmonth = imonth.ToString();
if (iday<10)
strday = "0" + iday.ToString();
else
strday = iday.ToString();
StartDate = stryear + "-" + strmonth + "-" + strday + " 00:00:00";
Response.Write(StartDate+"<br>");
}