Re: Date problem
Posted in 1997
GreggD09 — — source: Informix-list mailing list archive (1991-1998)
Try this select your date field from the database into your program
variable and use the function rdatestr() to convert it to a char string.
Maybe this will help.
$ date pay_date
$ declare tcursor cursor forselect
pay_date,
.............,
.............,
into
$ pay_date,
$ ..............,
$ ..............from table order by pay_date;
$ open tcursor;
rdatestr(pay_date, fmtpaydate);
fprintf(file,"%s\\n",frmpaydate);
rdatestr( date,string) converts a date in internal format to a char string
date of the form mm/dd/yyyy.
ESQL/C Version 5.0
Gregg Knight
Systems Analyst / Programmer
Informix / UNIX