Re: How do you use the to_date function.
From: Alan B. Evans <aevans_at_kaiwan.com>
Date: 28 Mar 1994 07:35:16 -0800
Message-ID: <2n6tfk$ihv_at_kaiwan.kaiwan.com>
Date: 28 Mar 1994 07:35:16 -0800
Message-ID: <2n6tfk$ihv_at_kaiwan.kaiwan.com>
Martin A. Boylan (andyb_at_bert.cs.byu.edu) wrote:
: I am trying to write a program that has a table with a date column, but
: I'm am having problems in Pro C getting dates to sort properly and
: search. For example:
: date >= :startdate
: and
: select date
: 1/23/92
: 2/12/89
: as if sorting by a string not a date.
: I have a few of the notes from the network, but they are very vague.
: Thanks in advance
: Andy B
Do the following in your SELECT statement :
SELECT
<select list> FROM BIZARRE_TABLE WHERE BIZARRE_DATE >= TO_DATE(:startdate, 'MM/DD/YYYY') ;
BIZARRE_DATE and and BIZARRE_TABLE are used for the purpose of this example. Also, the format of your date may vary. The syntax of the TO_DATE functions is rather simple for most cases. Your milage may vary.
Alan
-- You can reach me at _at_ : Internet : aevans_at_kaiwan.com ICBM : 33 39' North Cruise : 33 39' 37" North : 117 59' West : 117 59' 54" WestReceived on Mon Mar 28 1994 - 17:35:16 CEST