|
|
|
อีกข้อครับ C# Convert ให้อยู่ในรูปแบบของวันที่ ครับ, DateTime.Parse , Convert.ToDateTime |
|
|
|
|
|
|
|
มันจะยากไปมั้ยครับ รับวันที่จาก TextBox อ่ะ
Code (C#)
textBox1.Text = "21/03/2009";
string[] str = textBox1.Text.Split('/');
DateTime dt = new DateTime(Convert.ToInt16(str[2]), Convert.ToInt16(str[1]), Convert.ToInt16(str[0]));
|
|
|
|
|
Date :
2009-04-22 13:27:48 |
By :
ทะเลสีดำ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (C#)
Convert.ToDateTime(this.txtDate.Text).ToString("MM/dd/yyyy")
|
|
|
|
|
Date :
2009-04-22 13:32:36 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DateTime.Parse(TextBox1.Text);
|
|
|
|
|
Date :
2009-04-22 14:40:30 |
By :
anucham |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Convert.ToInt16 คืออีหยัง
|
|
|
|
|
Date :
2009-09-01 08:53:07 |
By :
love |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Date :
2011-03-05 18:38:03 |
By :
.. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (C#)
string myDateTimeString;
myDateTimeString = "19 Feb,2008";
DateTime dt;dt = Convert.ToDateTime(myDateTimeString);
Response.Write(dt.Day + "/" + dt.Month + "/" + dt.Year);
|
|
|
|
|
Date :
2012-06-07 06:28:59 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|