c# - How Can I Customize Date Format -


One of my table columns looks like the "SetDate" typetime type:

  2010 -08-02 02: 55: 58.420  

The date format for the application appears in the form:

  2/11/2010  

The problem is:

I am passing the DB through a SQL query application. The query contains the WHERE clause that compares the date to the SetDate application.

The Setdet column has this format: 2010-08-02 02: 55: 58.420 This format is done with the application: 3/12/2010

I need to compare two dates without time 2010-08-02 and 3/12/2010 . Since they are in different formats, I do not get any records back from the database.

I am using C # and T-SQL.

Any thoughts?

Try something like this:

  select * your Tables WHERE RTRIM (Convert (Cher (19), Setdate, 101)) = '3/12/2010'  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -