Page 1 of 1

Custom Date Extension for xYYMMDD ServerDateFormat

Posted: 13 Nov 2014, 03:09
by DNaigles
We have a customer that has a Server Date format of xYYMMDD where x is a “Centrury Flag”, i.e. today is 1141024 or March 12, 1998 is 980312. I have no experience in building custom extensions. Does anyone have (or can provide) a version of the date extension to intercept the interaction with the 5250 screen and add 19000000 to the date retrieved from the “5250 session screen” or subtract is before it is put back on the “5250 session screen”? I tried to do it myself, but it does not work. The Terminal Error says that the data is too big for the element (numeric(7). I am attaching the extension javascript file.

Re: Custom Date Extension for xYYMMDD ServerDateFormat

Posted: 18 Aug 2017, 15:21
by tim mcentee
Hi David

You don't need a custom extension. On the date options, change the server format from green to pink and put in the JQuery format directly.

if (centrury -== 19)
returnValue="ymmdd"
else
returnValue="1ymmdd"

Have a play with the formats.

The jquery date formats can be found here.
http://api.jqueryui.com/datepicker/

Tim