cancel
Showing results for 
Search instead for 
Did you mean: 

Date Format was not displayed correctly

Former Member
0 Kudos

Hi All,

We are developing WebDynpro Application successfully....but the date format was not displayed correctly.

the RFC Date format is : 05/23/2007

but in webdynpro we are getting date is wrong....we are getting date is : 09/05/2008.

the below one is our coding for date display format.....

public java.lang.String DisplayingDateFormat( java.lang.String date )

{

//@@begin DisplayingDateFormat()

// Current date Format in BW

SimpleDateFormat sdf = new SimpleDateFormat("MM.dd.yyyy");

String ChangedDateFormat=null;

try{

//Parsing String to Date

Date sqlDate =sdf.parse(date);

Locale userLocale=WDClientUser.getCurrentUser().getLocale();

DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.DEFAULT, userLocale);

//Converting Date to String

String newDateString = dateFormat.format(sqlDate);

ChangedDateFormat=newDateString;

}

I mention my user country is Germany.

can u tell me any one why we are getting wrong date.....

Really i appreciate.

Thanks and Regards,

Abhiram.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Too bad you can not offer yourself points. LOL

Former Member
0 Kudos

solved by myself