MMDDCCYY TO CCYYMMDD DATE FMT

sheeba

Reputable Poster
Hello all,

I looked up the date conversion doc on the JDE site plus searched the forum for a solution on this but was in vain.

Does anyone know of a bsfn or the best way to change the date format

i want to be able to change DDMMCCYY to CCYYMMDD.

PLS HELP.

THANKS
KS
 
Is this format change for the output of a report, or is this some kind of conversion done internally (as done in interfaces))

If this is for an interface, You can make the following calls in 'C':

DeformatDate using mask "OAE"
FormatDate using mask "EOA"

Alternatively, if you are dealing with a string, a simple manipulation using right(date,4) to get the year portion and left(date,4) to get the date portion followed by a cat(yearportion,dateportion) could do the trick.

Otherwise, the date setting is changed through the following:
1- The use display preference
2- The date format for the user's PC (windows control panel) where a program runs
3- The date format for enterprise server (windows control panel) where a program runs
 
SL,

hey thanks for the reply and all that info.

here is my situation - i am creating an interface to read data from a jde table and write it to a text file. In this case , i get a date field in (mmddccyy) and have to output it to ccyymmdd format before i write to the text file.

so do i assume your second method of concat is best suitable here.

thanks for ur help.
pls let me know
ks
 
SL

Again the interface is being created using Table Conversion - if u are still wondering!!!

so let me know what is the best way to get this done.

a date field from the table (mmddccyy) to a string format (ccyymmdd).

thanks
ks
 
got it to work!

here is how achieved the same.

used B34A100 - date format DME (no mask) and o/p it to a string var of 10 length.

then used concat and substr to get to the layout i want.

thanks
KS
 
Back
Top