[Mono-devel-list] DateTime.ToString (string format)

Daniel Morgan danielmorgan at verizon.net
Sat Feb 19 22:32:53 EST 2005


Sometimes DateTime.ToString("yyyy-MM-dd HH:mm:ss") produces garbage  for 
me.  

I'm running Mono 1.1.4 on Windowx XP Pro SP2 with a modified 
System.Data.OracleClient.dll.

This code works in a driver executalbe, but the same code will not work 
inside a class library like System.Data.OracleClient.  Note, the date 
was created via DateTime.Now.

DateTime dt3 = DateTime.Now;
object o = (object) dt3;
string oraFormat = "yyyy-MM-dd HH:mm:ss";
DateTime dt4 = ((DateTime) o);
string sDate3 = dt4.ToString (oraFormat).ToUpper ();
Console.WriteLine("sDate3: " + sDate3);

Could it be that somewhere in System.Data.OracleClient, it corrupts 
memory?  Could OCI (Oracle's Call Interface C library causing a problem 
here?

Here is a date unformatted: 
2/19/2005 10:07:44 PM

Here is the same date, but use the format "yyyy-MM-dd HH:mm:ss": 
YYYY-02-DD 2224:2I:SS

Any ideas?

I'm trying to implement OracleDateTime functionality in Mono's 
System.Data.OracleClient.





More information about the Mono-devel-list mailing list