ToOracleSqlDate
Converts a Timestamp to a String which can be used in a Oracle SQL Query
Source
public static string ToOracleSqlDate(this DateTime dateTime)
{
return String.Format("to_date('{0}','dd.mm.yyyy hh24.mi.ss')", dateTime.ToString("dd.MM.yyyy HH:mm:ss"));
}
Example
DateTime.Now.ToOracleSqlDate()