Format Mask B0800208

dreski

Member
I'm using this business function and I'm not sure what Format Mask code I should use. Can someone tell me where I can find a list of Format Masks I can use?
 
The mask is made up of characters meaning:

D - Day (1 or two digits)
A - Day (zero pad 2 digits)
Y - Day Number (space pad 2 digits)
M - Month Number (1 or 2 digits)
O - Month Number (zero pad 2 digits)
N - Month Number (space pad 2 digits)
R - 2 digit year
E - 4 digit year
S - Date slash character
C - Date comma character

In B0800208 (String to Date):
szStringToConvert->"04/18/2007"
szFormatMask->"OSASE"
will return 4/18/07 in JDEDATE

or
szStringToConvert->"041807"
szFormatMask->"OAR"
will return 4/18/07 in JDEDATE

Craig
 
The date format mask consists of a combination of individual format characters as defined for the jdeDATE API.

These individual format characters are as follows,

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

Thereby using a combination of the above characters you can create any format mask as needed. Some of the most commonly used date format masks and their results are given below:-

ASOSE = DD/MM/YYYY
ASOSR = DD/MM/YY
ESOSA = YYYY/MM/DD
OSASE = MM/DD/YYYY
OSASR = MM/DD/YY
RSOSA = YY/MM/DD

Regards,

Shailesh
 
Back
Top