Date to JDE Date

November 18, 2008

I know since we posted the JDE date to real date function, everyone has been wondering where the real date to JDE date function is.  Well, "ask and you shall receive."

drop function myuser.DateToJ!

CREATE function myuser.DateToJ (RealDate date)
    returns decimal(8,0)
    language sql
    deterministic
    no external action
begin atomic
   if RealDate is null then
      return 0;
   else
      return ((Year(RealDate) - 1900) * 1000) + DayOfYear(RealDate);
   end if;
end!


select myuser.DateToJ(date('2008-11-18'))
from myuser.dual!

Builders of information systems that work as they're intended to.

WORK WITH US
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram