convert Date by Exact Format

To convert Date time by Format

string datestring="12/2/2012"; DateTime.ParseExact(datestring, "MM/dd/yyyy", CultureInfo.InvariantCulture);
<div style="overflow-x: scroll;"> <div style="width: 1324px;"> string datestring="12/2/2012"; DateTime.ParseExact(datestring, "MM/dd/yyyy", CultureInfo.InvariantCulture); </div> </div>
  1. <code>
  2. <div style="overflow-x: scroll;">
  3. <div style="width: 1324px;">
  4. string datestring="12/2/2012";
  5. DateTime.ParseExact(datestring, "MM/dd/yyyy", CultureInfo.InvariantCulture);
  6. </div>
  7. </div>
  8. </code>
<code>
<div style="overflow-x: scroll;">
<div style="width: 1324px;">
     string datestring="12/2/2012";
     DateTime.ParseExact(datestring, "MM/dd/yyyy", CultureInfo.InvariantCulture);
</div>
</div>
</code>

Popular posts from this blog

Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=xx.0.0.0, Culture=neutral, PublicKeyToken='xxx' or one of its dependencies.

C# Crop white space from around the image

The specified version string contains wildcards, which are not compatible with determinism.