Custom Date Extension for xYYMMDD ServerDateFormat
Moderator: jeanmichel
Custom Date Extension for xYYMMDD ServerDateFormat
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.
-
tim mcentee
- Posts: 40
- Joined: 26 Jul 2017, 13:20
Re: Custom Date Extension for xYYMMDD ServerDateFormat
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
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