You are on page 1of 15

Title: How to use Date Business Functions in the J.D.

Edwards software
Abstract: This document provides information on various date business functions that are available in the J.D. Edwards software.
Product Suite Release Document ID Date Created Date Re iewed Date Re ised J.D. Edwards 5 and OneWorld® Software Technical ERP 8.0, Xe ott 0! 005" 05#0$#%00! 0!#"0#%00" 0!#"0#%00"

Ta!le of Contents
". Summar# Ta!le of the Date Business Functions $. %hat is JDE Julian Date& '. JDE Date Routines: Date (as) * aila!le +. B,,,,"$-: ReturnToda#sDate .. B,-,,,/0: Retrie eDa#of%ee) /. B+$,"+0,: 1etDa#of%ee) -. B,0,,,"': Con ertStrin2ToDate 0. B,0,,$,0: Con ertStrin2DatetoDateFormat 3. B',,,$.,: 1et(onthDescri4tion ",. B',,,$/,: 1et5earDescri4tion "" B+"B,+-,: FormatDateFromD(5 "$. B-/,,3$,: Con ert6um!ers*ndDatesToStrin2 "'. B3",,,,": Con ert7ulianDateto7deDate "+. B30,,$",: Con ert From and To Julian Date from JDED*TE ".. B+.,,+3,: DateCon ersiontoJulian "/. B,,,,$,,: Si8Di2it6umerictoDate "-. B,,,,$,,: DatetoSi8Di2it6umeric

$ di6it (ear descri2tion Ret&rnToda(sDate Retrie/eDa(ofWee0. 1etDa(ofWee0 *$%0!$80 5on/ertStrin6ToDate *08000!" *0800%08 *"000%50 *"000%. +iscal 7ear and 5ent&r( JDE Date -&'eric 7777DDD JDE Date -&'eric 577DDD JDE Date -&'eric 577DDD Strin6 Period *e6in Date. 33.&lianDateto.009%0 5on/ert-&')ers:ndDatesToStrin6 5on/ert. T&esda(. Jan&ar(.: CalculateBe2inDateofPeriod S&''ar( Ta)le of the Date *&siness +&nctions Function 6ame Source (odule *0000!%.0 *. DD JDE Date JDE Date Strin6 -&'eric 577DDD JDE Date -&'eric 7777DDD JDE Date -&'eric 577DDD JDE Date JDE Date 8 3as0 Period -&')er. i. i... 3onda(.3.: Con ertDateToStrin2 "3.00090 5on/ertJ&lianToDate Date5on/ersiontoJ&lian Si<Di6it-&'erictoDate DatetoSi<Di6it-&'eric 5on/ertDateToStrin6 5alc&late*e6inDateofPeriod Strin6 77. 5o'2an(.deDate *9!0000! 5on/ertDateToJ&lian *9800%!0 *9800%!0 *$500$90 *0000%00 *0000%00 *9800$.."0..000. and#or Period Endin6 Dates for all !$ Strin6 33#DD#7777 Strin6 Date 8 Date 3as0 -&'eric 5alendar 3onth -&'eric 5alendar 7ear .0 -!. . *0.e. Period End Date. 4.e. B30.. JDE Date JDE Date 3onth descri2tion.0 5on/ertStrin6DatetoDate+or'at 1et3onthDescri2tion 1et7earDescri2tion +or'atDate+ro'D37 *$!*0$. 6"-. +e)r&ar(.8.. In4ut -one JDE Date 9ut4ut JDE Date Da( descri2tion.. *e6in Date of +iscal 7ear.+/.

00. %000 C !000"! in a J&lian date for'at @577DDDA. Bac) to To4 Bac) to Summar# Ta!le JDE Date Ro&tines? Date 3as0s :/aila)le (*S? D : 7 DESCRIPTI96 Da( -&')er. >t sho&ld )e &2dated &sin6 the followin6 r&les? • • • The first di6it descri)es the cent&r(. etcAB The fo&rth.Periods Bac) to To4 What is JDE J&lian Date= :ll dates in the J. : date in JDE J&lian for'at is a si< di6it n&'eric field which re2resents the cent&r(. The Business function will not return correct information if the user 4asses a numeric field of C55DDD to the JDEDate 4arameter. etc.A E<a'2le? The date for Jan&ar( "!. : /al&e of ! indicates the %!st cent&r( @%000sAB The second and third di6its re2resent the (ear @98.out4ut 4arameter< users can onl# 4ass 4arameters with the attri!ute of data dictionar# item t#4e "" =Date> and class D*TE%. s2ace 2ad % di6its . Dero 2ad to % di6its Da( -&')er. (ear and da( of the (ear. ! or % di6its Da( -&')er. Edwards data)ase are stored in a JDE J&lian for'at. !!% for :2ril %!. : /al&e of 0 indicates the %0th cent&r( @!900sA. fifth and si<th di6its re2resent the da( in the (ear @00! for Jan&ar( !. 99. 0!. ! C %!st 5ent&r( 00 C 7ear in the %!st 5ent&r( 0"! C Da( in the (ear 6ote: If the Business Function re:uires JDED*TE as an in4ut.D.

fro' confi6&ration Date co''a character.ddateDate+orToda( Bac) to To4 Data Item D1J Data T#4e JDED:TE Bac) to Summar# Ta!le I. fro' confi6&ration Bac) to Summar# Ta!le *0000!%. Parameters: Data Str&ct&re? D0000!%. )( lan6&a6e. Parameter 6ame . ! or % di6its 3onth -&')er. s2ace 2ad to % di6its 3onth -&')er. Dero 2ad to % di6its 3onth -&')er. )( lan6&a6e. fro' ED5 % di6it (ear $ di6it (ear Date slash character.3 O T * R E S 5 Bac) to To4 3onth -&')er.9 O *0.8? Retrie/eDa(ofWee0 Pur4ose: .? Ret&rnToda(sDate Pur4ose: This f&nction will ret&rn toda(Fs date in a J&lian date @JDE for'atA.000. fro' ED5 :))re/iated 3onth -a'e.

"+0.A and itsF corres2ondin6 descri2tion @S&nda( Sat&rda(A.85 Parameter 6ame . and ret&rn the n&'eric da( of the wee0 @0 .: 1etDa#of%ee) Pur4ose: This f&nction will ta0e a date. . and ret&rn the n&'eric da( of the wee0 @0CS&nda(.000.9 > O O B+$.This f&nction will ta0e a date. Parameters: Data Str&ct&re? D0.dDate 'nDa(ofWee0 dsDa(ofWee0Desc Bac) to To4 Descri4tions S&nda( 3onda( T&esda( Wednesda( Th&rsda( +rida( Sat&rda( Data Item *DOWGD DOW DS%0 Data T#4e JDED:TE 3:THI-E3ER>5 5har Bac) to Summar# Ta!le I. Parameters: . 6umeric @alue 0 ! % " $ 5 .CSat&rda(A and error code @0Cs&ccessA.

9 > O O *08000!"? 5on/ertStrin6ToDate Pur4ose: This f&nction will con/ert a strin6 that is in a date for'at @33#DD#7777A to a J&lian date @JDE for'atA. >f the date was in a for'at of 05%90% the for'at 'as0 . if the strin6 date is in a for'at of 05#%9#%00% the for'at 'as0 to )e 2assed to the f&nction wo&ld )e OS:SE. +or e<a'2le.9 O > *0800%08? 5on/ertStrin6DateToDate+or'at Pur4ose: This f&nction will con/ert a strin6 that is in a date for'at to a J&lian date @JDE for'atA.dDate 'nDa(ofWee0: cError5ode Bac) to To4 Data Item DTE DOW ERR5 Data T#4e JDED:TE 3:THI-E3ER>5 5har Bac) to Summar# Ta!le I.dDate5on/ertdDate sDStrin6To5on/ert Bac) to To4 Data Item DRJJ K5!0: Data T#4e JDED:TE Strin6 Bac) to Summar# Ta!le I. The Date 3as0 2assed as a literal to the f&nction descri)es the for'at of the strin6 date.Data Str&ct&re? D$%0!$80: Parameter 6ame . One di6it da( and#or one di6it 'onth in2&t wonFt wor0 on this )&siness f&nction. Parameters: Data Str&ct&re? D08000!" Parameter 6ame .

etc.9 O > > *"000%50? 1et3onthDescri2tion Pur4ose: This f&nction will /alidate a two di6it n&')er entered within a ran6e @! !%A and con/ert the % di6it n&')er to a strin6 descri2tion of the 'onth. Parameters: Data Str&ct&re? D0800%08 Parameter 6ame .0 to con/ert JDEDate to Strin6 @i. %C+e)r&ar(. "C3arch.d5on/ertedDate sDStrin6To5on/ert sD+or'at3as0 Bac) to To4 Data Item DRJJ K5!0: K509: Data T#4e JDED:TE Strin6 Strin6 Bac) to Summar# Ta!le I.e.wo&ld )e O:R.e. See the infor'ation on the Date 3as0s :/aila)le for the a/aila)le date 'as0s. !%#%0#05A Ese the s&)str E<2ression 3ana6er f&nction to 6et the 'onth in Strin6 for'at @i.9 > O -ote? To 6et the 'onth descri2tion fro' a JDEDate? 5all *9800$. The f&nction will ret&rn L>n/alid Entr(L if the in2&t n&')er is not in the ran6e. @!CJan&ar(. Parameters: Data Str&ct&re? D"000%50 Parameter 6ame 'n5alendar3onth sDDescri2tion Data Item 3T DES5 Data T#4e -&'eric Strin6 I. !%A .A.

The f&nction will co')ine the cent&r( and (ear and 6i/e the descri2tion @i.0 Parameter 6ame 'n5alendar7ear sD7earDescri2tion -ote? To 6et the (ear descri2tion fro' JDEDate? 5all *9800$..e. !9 8 98 C !998A.0? 1et7earDescri2tion Pur4ose: This f&nction will /alidate a n&')er entered within a ran6e @00 99A and con/ert a % di6it n&')er to a $ di6it descri2tion of the (ear.0 to con/ert JDEDate to Strin6 @i.9 > O Bac) to To4 Bac) to Summar# Ta!le . >f the (ear is less than or eM&al to the defa&lt /al&e of D57R data ite'.0 to con/ert strin6 to n&'eric to 6et a n&'eric calendar 'onth @i.e. !%#%0#05A Ese s&)str E<2ression 3ana6er f&nction to 6et the (ear in Strin6 for'at @i.0 to con/ert strin6 to n&'eric to 6et a n&'eric calendar (ear @i. then cent&r( will )e F!9F Parameters: Data Str&ct&re? D"000%.e.5all *$000. 05A 5all *$000.e. 05A Data Item 7R DES5 Data T#4e -&'eric Strin6 I. !%A Bac) to To4 Bac) to Summar# Ta!le *"000%..e. then cent&r( will )e F%0F >f the (ear is 6reater than the defa&lt /al&e or D57R data ite'.

the cent&r( is %0 Data Item 7R 3-TH DO3 OPDT Data T#4e 3:THI-E3ER>5 3:THI-E3ER>5 3:THI-E3ER>5 JDED:TE I.. 33. Parameters: Data Str&ct&re? D.0 Parameter 6ame 'n7ear 'n3onth 'nDa( . One di6it n&')er on the in2&t 'onth and da( is acce2ta)le..dDate S4ecial Instructions: This )&siness f&nction calls *0000!5$.009%0? 5on/ert-&')ers:ndDatesToStrin6 Pur4ose: This )&siness f&nction will con/ert a J&lian date @JDE for'atA into a strin6 DD3377 for'at @0 2ad for one di6it da( and 'onthA.009%0 . the cent&r( is !9 >f 77 is less than the defa&lt /al&e of 5E-T5H1 @DD ite'A.*$!*0$. >f 77 is 6reater than the defa&lt /al&e of 5E-T5H1 @DD ite'A. DDA to a J&lian date @JDE for'atA. Parameters: Data Str&ct&re? D$!*0$.0? +or'atDate+ro'D37 Pur4ose: This )&siness f&nction will con/ert " n&'eric /al&es @77.9 > > > O Bac) to To4 Bac) to Summar# Ta!le *.

. )&t rather in a 7777DDD for'at.: Con ert From and To Julian Date from JDED*TE Pur4ose: 5on/ertDateToJ&lian? This f&nction will con/ert a J&lian date @JDE for'atA to a J&lian n&'eric date @7777DDDA -ote? This J&lian n&'eric date o&t2&t is not in the JDE J&lian Date for'at of 577DDD.. % for %!Fs.9 > > O > -&')erTo*e5on/erted 3:TH0! DateTo*e5on/erted D:TE0! Tar6etStrin6 Gen6thOfTar6etStrin6 Bac) to To4 RE3! >-T0! B3".$"... Parameters: Data Str&ct&re? D9800%!0 Parameter 6ame . ! for %0Fs.. .9 O > 'nJ&linaDate>n7777DDD 5DG Bac) to To4 B30.Parameter 6ame Data Item Data T#4e 3:THI-E3ER>5 JDED:TE STR>-1 >-TE1ER Bac) to Summar# Ta!le I. The first di6it of a J&lian n&'eric date in2&t re2resents cent&r( 0 for !9Fs.dDateTo5on/ert Data Item TRDJ Data T#4e JDED:TE 3:THI-E3ER>5 Bac) to Summar# Ta!le I..": Con ert7ulianDateto7deDate Pur4ose: This )&siness f&nction will con/ert a J&lian n&'eric date @JDE J&lian +or'at of 577DDDA to a J&lian date @JDE for'atA...

To 6et the n&'eric field to 2rint o&t on the re2ort..: DateCon ersiontoJulian Pur4ose: This )&siness f&nction will con/ert a J&lian date that is in JDE Date +or'at to a 'ath n&'eric J&lian date @JDE J&lian +or'at of 577DDDA.5on/ertJ&lianToDate? This f&nction will con/ert J&lian n&'eric date @7777DDDA to a J&lian date @JDE for'atA -ote? The in2&t J&lian n&'eric date sho&ld not )e in the JDE J&lian Date for'at of 577DDD. Parameters: Data Str&ct&re? D9800%!0 5on/ertDateToJ&lian? Parameter 6ame .9 O > 'nJ&linaDate>n7777DDD 5DGN N5DG is a % di6it n&'eric data ite'.dDateTo5on/ert Data Item TRDJ Data T#4e JDED:TE 3:THI-E3ER>5 I. ! for %0Fs. The first di6it of a J&lian n&'eric date in2&t re2resents cent&r( 0 for !9Fs.....9 > O 'nJ&linaDate>n7777DDD 5DGN 5on/ertJ&lianToDate? Parameter 6ame .dDateTo5on/ert Data Item TRDJ Data T#4e JDED:TE 3:THI-E3ER>5 I. Parameters: Data Str&ct&re? D$500$90 . . )&t rather in a 7777DDD for'at. 7o& 'i6ht need to &se other 'ath n&'eric data ite's to 2ass in#o&t to the )&siness f&nction. % for %!Fs. Bac) to To4 Bac) to Summar# Ta!le B+. dis2la( deci'al and edit code need to )e chan6ed on the field.+3.

.dO&t2&tDate cRet&rn5ode S4ecial 6ote: This *&siness +&nction is first a/aila)le with E2date $ of J.9 > O O B.dDateTo5on/ert Data Item TRDJ Data T#4e JDED:TE 3:THI-E3ER>5 Bac) to Summar# Ta!le I. Parameters: Data Str&ct&re? D0000%00* Parameter 6ame 'n>n2&t-&'eric ..: Si8Di2it6umerictoDate Pur4ose: This )&siness f&nction will con/ert a 'ath n&'eric that is in JDE J&lian for'at of 577DDD to a J&lian date in JDE Date +or'at.D.... ! for %0Fs... Edwards software release Xe. % for %!Fs.9 > O 'nJ&lianDate>n777DDD 5DG Bac) to To4 B.$.$. . The first di6it of a J&lian n&'eric date in2&t re2resents cent&r( 0 for !9Fs...: DatetoSi8Di2it6umeric Pur4ose: .Parameter 6ame .. Bac) to To4 Bac) to Summar# Ta!le Data Item 5H1H D:TE0! EK0! Data T#4e 3:THI-E3ER>5 JDED:TE 5H:R:5TER I..

dDateTo5on/ert Data Item DRJJ K508: Data T#4e JDED:TE STR>-1 STR>-1 I.0? 5on/ertDateToStrin6 Pur4ose: 5on/ertDateToStrin6? This )&siness f&nction will con/ert a J&lian date @JDE for'atA into a strin6 accordin6 to the selected 3:SO. . ! for %0Fs.. Bac) to To4 Bac) to Summar# Ta!le Data Item D:TE0! 5H1J EK0! Data T#4e JDED:TE 3:THI-E3ER>5 5H:R:5TER I. Edwards software release Xe. The first di6it of a J&lian n&'eric date in2&t re2resents cent&r( 0 for !9Fs.d>n2&tDate 'nO&t2&t-&'eric cRet&rn5ode S4ecial 6ote: This *&siness +&nction is first a/aila)le with E2date $ of J.D.9 > O > sDDate5on/ertedToStrin6 sDDate+or'at +R3TN NEser can define the field )( selectin6 Giteral and doin6 a /is&al assist and (o& will 6et the choice )elow. % for %!Fs.9 > O O *9800$.0: Parameter 6ame ...This )&siness f&nction will con/ert a J&lian date that is in JDE Date +or'at to a 'ath n&'eric J&lian date @JDE J&lian +or'at of 577DDDA. . Date 3as0 is defined in ED5 00#D+ Parameters: Data Str&ct&re? D9800$. Parameters: Data Str&ct&re? D0000%00: Parameter 6ame .

This 2re/ents 2rintin6 $ di6it (ears. $ di6it 7earN Da(.. Da( @7733DDA 6"-. Parameters: Data Str&ct&re? D!.00090 Parameter 6ame 'nPeriod-o Data Item PData T#4e 3:THI-E3ER>5 I. 2eriod end date. )e6innin6 date of the fiscal (ear. 7ear @DD3377A 77#33#DD $ di6it 7ear. 3onth.3.. >t forces slashes )etween the da( 'onth and (ear. and it allows a date that is onl( 8 characters lon6. 3onth. 3onth. $ di6it 7earN 33#DD#77 3onth. Bac) to To4 Bac) to Summar# Ta!le *44earance Re6ional settin6 in control 2anel DD#33#77 DD#33#77 Da(. Da(N 33#DD#77 3onth.: CalculateBe2inDateofPeriod Pur4ose: This )&siness f&nction will ret&rn a 2eriod )e6in date.0 was )&ilt for a /er( li'ited &se and has a /er( restricti/e for'at. Da(.Date 3as0 a/aila)le @ED5 00#D+A Codes Descri4tion Ese S(ste' Kal&e D3E D37 E3D 3DE 3D7 73D AS4ecial 6ote: The )&siness f&nction 5on/ertStrin6ToDate *9800$. and#or the endin6 dates for all !$ 2eriods of the fiscal (ear. it reM&ires a leadin6 0 for 'onths and da(s that are a sin6le di6it.9 > . Da(. : $ di6it (ear will )e tr&ncated into a % di6it (ear. 3onth. 7ear @33DD77A 77#33#DD 7ear.

dPeriod$EndDate .D.dPeriod5EndDate .dPeriod. Edwards software release Xe.cRetrie/e+0008Records sD5o'2an( 'n5ent&r( 'n+iscal7ear! .EndDate .dPeriod!!EndDate .dPeriod!$EndDate cS&22ressError3essa6e sDError3essa6e>D .dPeriod!"EndDate .dPeriod!0EndDate . Bac) to To4 Bac) to Summar# Ta!le Related ?nowled2e Documents Document Document Title ID OTT 99 E<2ression 3ana6er +&nctions 00!.dPeriod!%EndDate .dPeriodEndDate S4ecial 6ote: EK0! 5O 5TR7 +7 DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ DTEJ SEPPS DT:> DTEJ 5H:R:5TER STR>-1 3:THI-E3ER>5 3:THI-E3ER>5 JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE JDED:TE 5H:R:5TER STR>-1 JDED:TE > > > > > O O This *&siness +&nction is first a/aila)le with E2date $ of J.dPeriod"EndDate .dPeriod9EndDate .d*e6inDateof+iscal7ear .dPeriod!EndDate .dPeriod.dPeriod*e6inDate .dPeriod8EndDate .dPeriod%EndDate . .EndDate .