Page 1 of 1

Compare to dates

Posted: Tue 02 Feb 2016 14:38
by Øyvind
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 ?

Re: Compare to dates

Posted: Tue 02 Feb 2016 14:58
by Øyvind
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