How to cast VARCHAR to TIMESTAMP?
<p>I need to convert <code>VARCHAR</code> to <code>TIMESTAMP</code> </p>

<p>This works only when the month has two digits </p>

<pre><code>SEL CAST('12/25/1994 11:46:29 PM'  AS TIMESTAMP(0) FORMAT 'mm-DD-YYYYBhh:mi:ssBt' )
</code></pre>

<p>However, when the month has one digit this fails </p>

<pre><code>SEL CAST('1/2/1994 11:46:29 PM'  AS TIMESTAMP(0) FORMAT 'mm-DD-YYYYBhh:mi:ssBt' )     
</code></pre>

<p>How to account to month with one digit ? </p>