Try this binding:
<TextBlock Text="{x:Bind DuoDate.ToShortDateString()}" ...
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How can I remove the time with the date on a datePicker on sql server c #. Example ddMMYYY 00:00:00
Try this binding:
<TextBlock Text="{x:Bind DuoDate.ToShortDateString()}" ...
Hi,
Welcome to Microsoft Q&A!
I don’t understand your meaning well. You means that you have inserted an value that seleced through DatePicker(UWP control) into SQL database, and now you want to remove the value from database, right? If yes, please refer to the following code.
using (var cmd = connection.CreateCommand())
{
connection.Open();
cmd.CommandText = "delete from tableName where columnName = @date";
cmd.Parameters.AddWithValue("@date", date);
cmd.ExecuteNonQuery();
}
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
If you never need the time, then use a date column instead of datetime in SQL.
on a datePicker on sql server
There is not DatePicker or any other control on SQL Server side.
Use DateTime.Date Property to get the date without time potion.
Another way is via CASTing:
SELECT CAST(GETDATE() AS DATE);