Convert Date to numeric
<p>How can I convert a date like 'Jan 1 2014 12:00AM' to 20140101? </p>

<p>when the month is less then 10 I need to put a zero. </p>

<p>I tryed with datepart but had problem adding '0' before it.</p>

<p>thank's.</p>