RE: [PHP-DB] SELECTing a date range from a table

From: Date: Mon, 05 Aug 2002 02:04:20 +0000
Subject: RE: [PHP-DB] SELECTing a date range from a table
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-20987@lists.php.net to get a copy of this message
I have used phpMyAdmin to change my "edate" and "cdate" columns to a DATE type. This has changed all of the data to a YYYY-MM-DD format which has messed up the dates in my database, but I can work with Excel to try to fix that. Now, all of the data in "edate" and "cdate" is similar to "2002-07-08." Chase -----Original Message----- From: Jason Wong [mailto:phplist@gremlins.com.hk] Sent: Sunday, August 04, 2002 1:22 PM To: Chase Knott Subject: Re: [PHP-DB] SELECTing a date range from a table On Monday 05 August 2002 02:04, Chase Knott wrote: > Oh sure... Use logic!!! > > I am using a MySQL database that has 4 columns, right now, they are > all set to VARCHAR since I was getting errors trying to make them date > fields. If you want to save yourself headaches and problems in the future, you should change edate & cdate to a date/datetime datatype. > The column names are "vendor," "edate," "cdate," and > "fname." > I want to pull all entries in the database where "cdate" is either > between a certain range, or is greater than or equal to a specified date. MySQL has numerous functions which deal with date/time calculations. To take advantage of them the columns on which they operate must be of date/time. What does a typical date in edate/cdate look like? -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Having no talent is no longer enough. -- Gore Vidal */

« previous php.db (#20987) next »