I am building an in-line SQL query (no need to comment about this I know its not the best method but its how the company does things!) and I need to compare an Oracle DATE c
You can use the Oracle TO_DATE function.
WHERE someDateColumn <= TO_DATE(c#_date, 'YYYY/MM/DD')
For the c# date (see custom date and time strings):
DateTime.Now.ToString("yyyy/MM/dd")
If you want to add hours/minutes/seconds, you can modify accordingly.
edit - Actually since you mentioned the whole thing and not just the date, I'll add it. :)
WHERE someDateColumn <= TO_DATE(c#_date, 'YYYY/MM/DD HH24:MI:SS')
DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")
At home so I can't run it, but that should work.
To build a string with the where clause, you'd do this:
string someQuery = "SELECT * FROM aTable WHERE someDateColumn <= TO_DATE('" + DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss") + "', 'YYYY/MM/DD')"
If you wanted to use a specific date rather then DateTime.Now, just put the variable holding it there instead.