Monday, 31 March 2014

Convert datetime dd/mm/yyyy to mm/dd/yyyy using c#

 string dt=  DateTime.ParseExact("28/08/2012", "dd/MM/yyyy", CultureInfo.InvariantCulture).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture);

//Converting DateTime
Convert.ToDateTime(lbldt.Text, CultureInfo.CreateSpecificCulture("en-AU").DateTimeFormat);

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...