Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Date Format Change

  Asked By: James    Date: Feb 21    Category: Asp.net    Views: 1129
  

I have a calender control in a web form and once I click on a date I get the
date in a label as:
20/03/2003 I am getting
20=Date
03=Month
2003=Year

I want the date to be displayed with month as to be the first one to be
displayed, how do I do that using format or any other command?
03/20/2003
is what I want.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Agatha Miller     Answered On: Feb 21

No problem. Use


DateTime.ToString(formatting_string)

DateTime_variable.ToString(@"MM\/dd\/yyyy");

 
Didn't find what you were looking for? Find more on Date Format Change Or get search suggestion and latest updates.




Tagged: