Extract date from datetime column - SQL Server Compact
<p>I'm using SQL Server Compact 4.0 version, and although it might seem a simple thing to find in google, the examples I've tried none of them work.</p>

<p>My column <code>signup_date</code> is a <code>DateTime</code> with a value <code>04-09-2016 09:05:00</code>.</p>

<p>What I've tried so far without success:</p>

<pre><code>SELECT FORMAT(signup_date, 'Y-m-d') AS signup_date;
SELECT CONVERT(signup_date, GETDATE()) AS signup_date
SELECT CAST(data_registo, date) AS signup_date
</code></pre>

<p>I found that I could use <code>DATEPART</code> function, but that would force me to concat the values, is this the right path to follow? If so, how do I concat as Y-m-d?</p>

<pre><code>SELECT DATEPART(month, signup_date)  
</code></pre>