I'm having an issue converting dates. The following is the sequence of events.
1. Retrieve the timestamp from DB2 using a SafeDataReader,
2. Assign it to a variable,
3. Modify the value,
4. Save it back to DB2 using a ODBC connection object as a SQL string.
My problem is this... DB2 expects the date to be formatted as:
('2002-10-20-12.00.00.000000')
My question is simple. How do I get it formatted properly?
This is as close as I have gotten:
SmartDate MyDate = SmartDate.Parse(DateTime.Now.ToLongTimeString()).FormatString ("yyyy-MM-ddTHH:mm:ss"); Console.WriteLine(MyDate);Any help would be greatly appreciated.
Very Close! Close enough for me to figure it out.
public static string db2TimeStamp(SmartDate dt)THANKS !
Copyright (c) Marimer LLC