Anirudh’s Weblog


Using IFormatProvider for DateTime Formats in ASP.NET C#
April 19, 2010, 11:20 am
Filed under: Uncategorized

string myDateTime;
myDateTime= “19/02/2008 05:44:00″;
IFormatProvider myculture = new CultureInfo(“fr-Fr”, true);
dt = DateTime.ParseExact(myDateTime, “dd/MM/yyyy hh:mm:ss”, myculture, DateTimeStyles.NoCurrentDateDefault);

Advertisement

Leave a Comment so far
Leave a comment



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s



Follow

Get every new post delivered to your Inbox.