Compare to dates

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Øyvind
Posts: 2
Joined: Tue 02 Feb 2016 13:53

Compare to dates

Post by Øyvind » Tue 02 Feb 2016 14:38

I have a date compare problem:

In T-SQL I have this solution:
Select * from MyTable where convert(Date,ADay,104) = convert(Date,@Mydate,104)
Whats happends is that 104 changes the date to the same date formats.

What is best pactice in a DevArt Oracle environment ?

Øyvind
Posts: 2
Joined: Tue 02 Feb 2016 13:53

Re: Compare to dates

Post by Øyvind » Tue 02 Feb 2016 14:58

Solution:

Select * from MyTable to_char(SHIP_BY_DATE, 'DD-MON-YY') = to_char(:ShipByDate, 'DD-MON-YY')
Command.Parameters.Add("ShipByDate", Dato)

http://stackoverflow.com/questions/1017 ... oracle-sql

Post Reply