Frank Millman wrote: > I am using odbc from win32 extensions to connect to MS SQL Server. I > use mx.DateTime to handle dates. When I select a datetime column from > the database, odbc returns something called a DbiDate object. I cannot > find out any information on this type, but mx can convert it to a > mx.DateTime object using DateTimeFrom(), which is really all that I > need. > > I am looking into changing from mx.DateTime to using the builtin > datetime type, but I cannot figure out how to convert a DbiDate object > to a datetime object. > > First prize would be to have a datetime constructor that takes a > DbiDate object as input, in the same way that mx does, but this does > not seem to exist.
Try: datetime.datetime.utcfromtimestamp(int(value)) I gave up on dbiDates completely, however, (since their range is so limited) and use strings instead. Robert Brewer MIS Amor Ministries [EMAIL PROTECTED] No virus found in this outgoing message, because: 1) it's plain text, and 2) doesn't have an attachment. Checked by Common-Sense Anti-Virus, Version: 0.0.001 -- http://mail.python.org/mailman/listinfo/python-list