cancel
Showing results for 
Search instead for 
Did you mean: 

Using SimpleDateFormat - month goes missing (becomes 0)

Former Member
0 Kudos

Friends,

I am using a simple BAPI RFC model to access data from an SAP system. The BAPI returns me a date field (for example delivery date) as a java.sql.Date object. The value at the SAP side is 05.03.1975.

Was not too sure whether this date was in British format (dd.mm.yyyy). So I wrote a method to convert this date into the format I wanted.

But after formating, surprizingly the month (03) becomes 00. The date which gets displayed on the UI is 05.00.1975. Have any of you faced a similar problem, if yes what was the work around.

TYA,

Sachin.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Sachin,

Format must be dd.MM.yyyy (notice the case, "m" in lowercase is for minutes).

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com