Received: from access1.lan2wan.com (root@access1.lan2wan.com [205.177.8.10]) by hub.org (8.9.2/8.9.1) with ESMTP id JAA87915 for ; Sat, 6 Mar 1999 09:24:37 -0500 (EST) (envelope-from bmccoy@lan2wan.com) Received: from dragosani.lan2wan.com (pm1-26.lan2wan.com [205.177.8.66]) by access1.lan2wan.com (8.8.5/) with ESMTP id MAA08221; Sat, 6 Mar 1999 12:00:13 -0500 (EST) Received: from localhost (bmccoy@localhost) by dragosani.lan2wan.com (8.8.7/8.8.7) with ESMTP id JAA00617; Sat, 6 Mar 1999 09:14:04 -0500 X-Authentication-Warning: dragosani.lan2wan.com: bmccoy owned process doing -bs Date: Sat, 6 Mar 1999 09:14:04 -0500 (EST) From: "Brett W. McCoy" To: Zhenhua cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] How to sort date In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sat, 6 Mar 1999, Zhenhua wrote: > How do I order by date such as > select * order by thedate? > > The prefered date format for thedate: > March 5, 1999. Dates are stored in a different format than how they are displayed. You can sort on dates, or compare dates with =, >, <, etc., to determine which dates are earlier than others, which are concurrent, and so on. Try doing a date ordering and see what you get. Brett W. McCoy http://www.lan2wan.com/~bmccoy/ ----------------------------------------------------------------------- OS/2 must die! -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GAT dpu s:-- a C++++ UL++++$ P+ L+++ E W++ N+ o K- w--- O@ M@ !V PS+++ PE Y+ PGP- t++ 5- X+ R+@ tv b+++ DI+++ D+ G++ e>++ h+(---) r++ y++++ ------END GEEK CODE BLOCK------