Home » C#

Convert string to datetime and datetime to string in C#

27 January 2009 721 views Popularity: 2% Share/Bookmark

email

convert string to datetime

string datestring = “18 March 2008″;
DateTime parseddate = Convert.ToDateTime(datestring);
Response.Write(parseddate);

convert datetime to string

DateTime dtime = DateTime.Today;
string date = dtime.ToString(“yyyyMMdd”);
Response.Write(date);

Related posts:

  1. Magento: Convert Price from Current Currency to Base Currency and vice-versa
  2. Random number, string generation in PHP
  3. jQuery: Grey out background and preview image as popup
  4. PHP: Simple and easy way to format URL string
  5. Javascript: How to get current URL without Query string?
  6. PHP: Generating Multiple Random String
  7. PHP: How to get integer or decimal from a string?
  8. PHP: Parse Unparse String Array
  9. jQuery: How to replace string, div content and image src?
  • http://www.getaxhtmlcoder.com Psd To Css Conversion

    It’s nice to find a good article. I really enjoy lots of the blog posts on your web site.

  • http://www.getaxhtmlcoder.com Psd To Css Conversion

    It’s nice to find a good article. I really enjoy lots of the blog posts on your web site.