Is there a method to get the SAP date format?
(I could not find one).
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
| User | Count |
|---|---|
| 14 | |
| 12 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.