Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Comparing "date" values in Pro*C

Re: Comparing "date" values in Pro*C

From: <twod_at_not.valid>
Date: 1997/10/07
Message-ID: <61druo$90j$1@vnetnews.value.net>#1/1

Pravin Sitaram (ink_at_tiac.net) wrote:
: Within a Pro*C program, I need to select "date" values
: from a database table. What is the data type that I
: need to define in "C" for the host variable so that
: I can extract the "date" value into the host variable
: and then compare two "date" values? I tried "char *"
: datatype for the host variable, but it does not work.

It's not so much the datatype as how you are doing the comparison, which will depend on the format that you are retrieveing the dates in.

Maybe you could retrieve as YYYYMMDD into numeric datatypes and then use the normal numeric operators ?

Easy enough to cater for hours, mins and secs as well.

IAP

--
In an attempt to reduce junk email I use an invalid 'From' address.
My correct email address can be determined by replacing 'not.valid' with 
'value.net'
Received on Tue Oct 07 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US