Data and Time format in c++
<p>I need to convert Date time in 17 byte format.</p>

<p>The format is</p>

<pre><code>MMDDYYYY HH:MM:SS
</code></pre>

<p>in ASCII. </p>

<p>Example date and time: 01212009 09:38:57</p>

<p><strong>Hexadecimal format</strong>  </p>

<pre><code>0x30    0x31    0x32    0x31    0x32    0x30    0x30    0x39
0x20    0x30    0x39    0x3A    0x33    0x38    0x3A    0x35    0x37
</code></pre>

<p>the problem is how to convert this 01212009 09:38:57 in to hex format.I need to send this date timeover network.</p>
