×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
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.