Change Date format with ER

Chekov

Chekov

Active Member
Hi List
Does anyone know of a BSFN or other means of changing a date format within ER from DDMMYY to YYYYMMDD WITHOUT changing the user default in the user profile which is set to the former?
Thanks in advance..
 
Hello Checkov,
just wirte one in C:
1) Define a DataStructure with szDatein, szDateout, szFormatIn and szFormatOut. (All String-Variables!)
2) Create your Function with Skeleton.
3) After Variable declarations-Comment block insert:
JDEDATE dtDateBuf={0};
4) After Main Proccesssing insert:
DeformatDate(&dtDateBuf,lpDS->szDatein,lpDS->szFormatIn);
FormatDate(lpDS->szDateout,&dtDateBuf,lpDS->szFormatOut);

Thats all!
The FomatStrings (FormatMask) must contain:
Mask
Description

D
Day number, 1 or 2 digits

A
Day number, zero pad to 2 digits

Y
Day number, space pad to 2 digits

M
Month number, 1 or 2 digits

O
Month number, zero pad to 2 digits

N
Month number, space pad to 2 digits

T
Month number, by language, from UDC

B
Abbreviated month name, by language, from UDC

R
2 digit year

E
4 digit year

S
Date separator character (slash) , from configuration

C
Date separator character (comma), from configuration

Regards,
Carsten
P.S. I forgot:
in your case the FormatIn wil be "AOR"
FormatOut will be "EOA"
 
Hi, Chekov here again
I managed to find what i was looking for - if you are interested NER - N0701500 converts date to string in correct format when cOutputFormatCode_EV01 is set to 2
 
Back
Top