Code Comments
Programming Forum and web based access to our favorite programming groups.On Fri, 25 Mar 2005 16:43:18 +0100, Massimiliano Bariola <m.bariola@prodigiweb.it> wrote: > Justin Patrin wrote: > > Sorry for taking so long to answer. No, I really wanted to take > advantage of mySQL's ability to convert a YYYYMMDD( HH:II:SS) - > formatted number or string to the human-readble DATE/DATETIME form. Only > that DBDO seems to correctly do it if the initial field is a string > (sorry for the example above which does not show the real string -- it > should have been '20050323' and not '2005-03-23'). > The fact is that my original database dump contains datetimes as > YYYYMMDDHHIISS integers, so I didn't want to format the original records > to the YYYY-MM-DD HH:II:SS form on-the-fly. I am a lazy guy and besides, > MySQL is more than capable of converting it by itself, even when > starting from integers and not strings ;) > > So, DBDO works on a YYYYMMDDHHIISS string but not on a > similarly-formatted integer - while mySQL does. > I felt it's something that maybe should be addressed in future releases > of DBDO. > Likely it assumes it's a unix timestamp if it's an integer. Seriously, that format makes no sense as an integer as it's really a formatted string. If you start doing integer stuff to it (addition, etc) you're going to end up with something unusable. -- Justin Patrin
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.