title: C++ MFC Get current date and time
body: <p>I've been programming in VB.NET for most of my very programming career.  I have a C++ project provided to me, which I need to make a few modifications, and I am feeling hopelessly lost and confused.</p>
  
  <p>It is a Visual Studio 2008 MFC project in C++.</p>
  
  <p>an output variable has been defined:</p>
  
  <pre><code>char szout[900];
  </code></pre>
  
  <hr>
  
  <p>This line below, is used to append values to the output variable before output:</p>
  
  <pre><code>strcpy(szout, "TextHere")
  </code></pre>
  
  <hr>
  
  <p>So one of the many examples from searching, that i have tried, was to include at the top:</p>
  
  <pre><code>#include &lt;windows.h&gt;
  </code></pre>
  
  <hr>
  
  <p>And then for my code:</p>
  
  <pre><code>SYSTEMTIME st;
  GetSystemTime(&amp;st);
  char myDate[20] = st;
  CT2CA outputDate(myDate);
  strcat(szout, outputDate);
  </code></pre>
  
  <hr>
  
  <p>For some reason the variables appended on to szout must be of type CT2CA, which i'm not really sure what this is either.</p>
  
  <p>But then I get the following errors on the second and third line (char myDate...etc...) and (CT2CA output....etc....)</p>
  
  <pre><code>error C2440: 'initializing' : cannot convert from 'SYSTEMTIME' to 'char [20]'
  
  error C2664: 'ATL::CW2AEX&lt;&gt;::CW2AEX(LPCWSTR) throw(...)' : cannot convert parameter 1 from 'char [20]' to 'LPCWSTR'
  </code></pre>
  
  <hr>
  
  <p>So I'll clarify, I am a complete novice with this, and would appreciate any and all help.</p>
  
  <p>Thank you,</p>