cancel
Showing results for 
Search instead for 
Did you mean: 

Date Format

08-16-2004 8:15 PM
373 views 3 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Is there a method to get the SAP date format?

(I could not find one).

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

The date format and seperator character are held on the OADM table, in the fields "DateFormat" and "DateSep". You can read these using a recordset object.

The DateFormat maps as follows:-

DateFormat = 0 -> DD/MM/YY

DateFormat = 1 -> DD/MM/YYYY

DateFormat = 2 -> MM/DD/YY

DateFormat = 3 -> MM/DD/YYYY

DateFormat = 4 -> YYYY/MM/DD

Below is a sample that identifies the date seperator, it would be easy to also include the date format.

'Identify the current date seperator character

Set sboRecordset = sboCompany.GetBusinessObject(BoRecordset)

strQuery = "SELECT datesep from oadm where currperiod = (select max(currperiod) from oadm)"

sboRecordset.DoQuery strQuery

sboRecordset.MoveFirst

mstrDateSeperator = sboRecordset.Fields(0).value

Regards,

John.

Former Member
0 Likes

Thanks John.

former_member374
Active Contributor
0 Likes

Hi Catherine,

You are thanking a poster for his answer.

Please next time also give him points.

See: /people/mark.finnern/blog/2004/08/10/spread-the-love

This time I did it for you.

Remember: When you ask a question you also assume the responsibility to assign points.

Please check your other questions and if the answers were good.

Spread the love and give some points.

Thanks in advance, Mark.

Answers (0)