 |
tri_inn Level: Regular User Registered: 26-08-2002 Posts: 395
|
DateFormat in C#?
i work with vb.net,in vb.net we can format date like
Format(TextBox1.text,"dd/MM/yyyy"). but this kind of syntax is not available in C#
so please give me the above syntax in C# means syntax like Format(TextBox1.text,"dd/MM/yyyy").
|
|
21-09-2004 at 03:45 PM |
|
|
chrishelpme Level: Trainee
 Registered: 04-03-2005 Posts: 1
|
Re: DateFormat in C#?
public string GetDateTime()
{
return DateTime.Now.ToString("F",CultureInfo.CurrentCulture);
}
|
//use this function to get the current date time based on the culture you are in. Change "F" to display any format you want.
|
|
04-03-2005 at 03:03 PM |
|
|
|
|
 |
 |