mazafar4@my-deja.com wrote:
> I want to use thru dbaccess. If you have a ESQL/C program then it will
> be very helpful. I am using Informix 8.3FC4 on HP-UX 11.0
With XPS 8.30.FC4, you should be able to use CSDK 2.40 or 2.50.
>Jonathan Leffler <jleffler@informix.com> wrote:
> > mazafar4@my-deja.com wrote:
> > > I have a column and the datatype is DATE. The values are:
> > > 01/01/2001
> > > 01/16/2001
> > >
> > > Now how can I display this date value into:
> > > 01-JAN-2001
> > > 16-JAN-2001
> >
> > Using which software? In ESQL/C, you'd use one of the date formatting
> > routines with a format specifier of dd-mmm-yyyy and then run the result
> > through upshift.
I mis-spoke on the format string, it seems.
SQLCMD is available from the IIUG software archives. From the command
line,
use:
$ sqlcmd -A '%d-%b-%Y' -d stores -e 'select distinct created from> "informix".systables'
11-Aug-1999
24-Sep-1999
15-Dec-1999
21-Dec-1999
31-Dec-1999
24-May-2000
19-Sep-2000
$
All you have to do is arrange to upshift the strings as well. Oh, and
good luck...
The function to track is ctxt_getdate(), but you need to see where it is
used in output.c, not where it is defined in context.c.
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"