Support for IFormatProvider parameter in Convert.ToDateTime
Posted: Tue 23 Mar 2010 15:26
Hello,
I use the latest stable version of dotConnect for Oracle.
When i use the Convert.ToDateTime in a LINQ query, the correct TO_DATE function is created in the generated SQL. Nevertheless, if i try to use the overloaded Convert.ToDateTime method that accepts a cultureinfo object, i get an exception. I guess, there is not relevant support.
Isn't there a way to convert the standard General pattern of the DateTimeFormat represented by the CultureInfo in order to automatically set the correct Oracle format mask for the generated TO_DATE function? Correct me if i'm wrong, but it doesn't seem too hard to play with the characters...
For now, i use the SetSessionInfo of the connection to set the DateFormat. Nevertheless, this is a string and in Oracle format, so there is not a way for me to derive it from a user-defined culture...
I use the latest stable version of dotConnect for Oracle.
When i use the Convert.ToDateTime in a LINQ query, the correct TO_DATE function is created in the generated SQL. Nevertheless, if i try to use the overloaded Convert.ToDateTime method that accepts a cultureinfo object, i get an exception. I guess, there is not relevant support.
Isn't there a way to convert the standard General pattern of the DateTimeFormat represented by the CultureInfo in order to automatically set the correct Oracle format mask for the generated TO_DATE function? Correct me if i'm wrong, but it doesn't seem too hard to play with the characters...
For now, i use the SetSessionInfo of the connection to set the DateFormat. Nevertheless, this is a string and in Oracle format, so there is not a way for me to derive it from a user-defined culture...