Monday, 24 October 2011

Convert dd/MM/yyyy to mm/dd/yyyy in c# asp.net


   string UrDate = "YourDate in dd/mm/yyyy"
    System.Globalization.DateTimeFormatInfo dateInfo = new System.Globalization.DateTimeFormatInfo();
    dateInfo.ShortDatePattern = "dd/MM/yyyy";
    DateTime validDate = Convert.ToDateTime(UrDate, dateInfo);

No comments:

Post a Comment

Get all non-clustered indexes

DECLARE cIX CURSOR FOR     SELECT OBJECT_NAME(SI.Object_ID), SI.Object_ID, SI.Name, SI.Index_ID         FROM Sys.Indexes SI             ...