title: Does Win32 provide a GetDateTimeFormat to obtain a unified date-time string, in analogy to GetDateFormat and GetTimeFormat?
body: <p>I know Win32 has the NLS function <a href="http://msdn.microsoft.com/en-us/library/dd318086(VS.85).aspx" rel="nofollow noreferrer">GetDateFormat</a>, e.g.:</p>
  <pre><code>GetDateFormat(…, …, …, &quot;dddd','MM','y&quot;, …, …);
  </code></pre>
  <p>and it also has the function <a href="http://msdn.microsoft.com/en-us/library/dd318130(VS.85).aspx" rel="nofollow noreferrer">GetTimeFormat</a>, e.g.:</p>
  <pre><code>GetTimeFormat(…, …, …, &quot;tt ss':'hh':'mm&quot;, …, …);
  </code></pre>
  <p>But is there a way to format both the date and time at once, like a hypothetical GetDateTimeFormat function?</p>
  <pre><code>GetDateTimeFormat(…, …, …, &quot;tt dddd' - 'ss':'y';'hh':'mm MM&quot;, …, …);
  </code></pre>
  <p><strong>Note:</strong> The format string is intentionally constructed to demonstrate that not all format strings are linearly separable. Thus, this is not the trivial problem that it appears to simply concatenate the results of GetDateFormat and GetTimeFormat.</p>