Where do I adjust configuration setting in PHP using DB2 Connect to IBM
i machine so that date fields (Date Data Type) can be displayed in
browser in format *USA mm/dd/yyyy, instead of the *ISO format
yyyy-mm-dd?

Our date fields are JD Edwards Julian date format. To convert JDE
Julian dates to Date Data type, we use Howard Arner's JDE Julian date
function shown here:
http://www.itjungle.com/mgo/mgo092002-story02.html and at sqlthing.com

CREATE FUNCTION QGPL/CD
(JDEDATE DECIMAL(6,0))
RETURNS DATE
LANGUAGE SQL
SET OPTION DATFMT=*USA
BEGIN
DECLARE F_OUTPUT DATE;
DECLARE F_TEST INTEGER;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET F_TEST = 1;
SET F_TEST = 0;
SET F_OUTPUT = DATE(DIGITS(DECIMAL(JDEDATE+1900000,7,0)));
IF F_TEST = 0 THEN RETURN F_OUTPUT;
ELSE RETURN NULL;
END IF;
END
+++++++++++++++++++++++++++
In PHP, the syntax is:
select qgpl.cd(abupmj) from amsdta.f0101
dates currently display as:
yyyy-mm-dd
I would rather see *USA format mm/dd/yyyy

In System I navigator, at Run SQL Scripts > Connections > JDBC Settings,
I can change JDBC date display preferences to any preferred format.
How do I accomplish this in PHP?


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.