Re: Converting a date to a string
Posted in 1998
At 06:55 PM 22-08-98 GMT, Bob Neidecker wrote: >How do I convert a date to a string so that I can have the following where >clause > >WHERE date_column LIKE '12/%1/98' > >I want users to be able to use wildcards in strings. I know there is a >performance hit. Since you cannot do a like on a date column you must >first convert it to a string using some sort of string conversion operator. > I am new to Informix but in Oracle the where clause would look like > >WHERE TO_CHAR(date_column ,'MM/DD/YYYY') LIKE '12/%1/1998'. > >In sybase it would look like > >WHERE convert(char(10), date_column, 101) LIKE '12/%2/1998' Informix IDS >= v7.3 has a TO_CHAR function. See TFM, available online at http://www.informix.com . _____________________________________________________________ Clem Akins (aka clem@informix.com) Menlo Park x5937 Customer Course Development Informix Software, Inc Last seen: Reminded of beautiful New Zealand, on a CA coast