title: Convert DateTime to string according to Oracle Format Mask
body: <p>There is an Oracle DB API function which expects as an input a string representing date (or in other cases number) which is formatted by the provided format mask. </p>
  
  <p>Before I went and implemented Oracle Format Mask parser I thought I would ask whether there is a .net built-in or third party way of converting <code>DateTime</code> .net object to <code>string</code> using Oracle Format Mask?</p>
  
  <p><em>Update</em></p>
  
  <p>Examples:</p>
  
  <pre><code>DateTime date = DateTime.Now;
  string convertedDate = ConvertDateTimeToOracleFormattedString (date, "Month DD, YYYY"); // should produce: March 21, 2014
  convertedDate = ConvertDateTimeToOracleFormattedString (date, "CC BC"); // should produce: 21
  // any other valid oracle format combination: http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm#i34924 
  </code></pre>
  
  <p>My current idea is to parse provided Oracle Format Mask into equivalent .net custom date and time format string: <a href="http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx</a> and use it when converting .net DateTime to string: <code>DateTime.Now.ToString ("equivalentDotNetFormat");</code>. The equivalent .net format of "Month DD, YYYY" would be "MMMM dd, yyyy". Unless there is a quicker approach.</p>