How can I remove the time with the date of the database in the data retrieval

Javier R 211 Reputation points
2021-05-06T20:20:40.657+00:00

How can I remove the time with the date on a datePicker on sql server c #. Example ddMMYYY 00:00:00

Universal Windows Platform (UWP)
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,982 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 118K Reputation points
    2021-05-17T17:54:52.263+00:00

    Try this binding:

    <TextBlock Text="{x:Bind DuoDate.ToShortDateString()}" ... 
    
    1 person found this answer helpful.
    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. AryaDing-MSFT 2,916 Reputation points
    2021-05-07T08:01:10.18+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.