RE: [PHP-DEV] RE: [PHP-DB] PHP and MySQL queries...

From: Date: Thu, 25 Oct 2001 18:21:48 +0000
Subject: RE: [PHP-DEV] RE: [PHP-DB] PHP and MySQL queries...
References: 1  Groups: php.db php.dev 
Request: Send a blank email to php-dev+get-69013@lists.php.net to get a copy of this message
> From: Chris Newbill [mailto:cnewbill@elementalrain.com] > >snip... (been doing VBScript on ASP for several years, tho). > > I feel sorry for you. :) ;) Never fear. It works, does what it needs to do (so long as it's properly patched ;) and I make a fist-full of money for moon-lighting. Can't complain too loudly, eh? > >If you're going to store it as an integer, why not store "10/24/2001" > >as YYYYMMDD > A better way to do integer date is a UNIX timestamp. This will sort just as > easy as the method above. > > By looking at the date() function you should be able to see immediately the > benefit in ease-of-use (not to mention portability in the DB) and formating > options available for the timestamp. > > http://www.php.net/date > > -Chris Don't get me wrong.. I'm quite comfortable with manipulating dates (well.. as far as M$ goes), and I fully intend to continue using DATE fields and functions to handle my date needs. I'm too lazy to re-invent the wheel. The crux of my question was aimed only at those who didn't want to use DATE fields and would rather use int fields instead. I wanted to make sure I wasn't missing some cool feature of PHP. ..and the feedback I'm getting indicates that my general understanding of dates in ASP is not too different with PHP. TIM -Things are more like they are today than they ever have been before.

« previous php.dev (#69013) next »