cancel
Showing results for 
Search instead for 
Did you mean: 

Date issue in webdynpro java

Former Member
0 Kudos

Hi All,

i am facing the problem,while getting list of dates from BAPI to Web dynpro JAVA.In BAPI date formate is SQL formate(dd.mm.yyyy).

Please help me regarding this..

Accepted Solutions (1)

Accepted Solutions (1)

Qualiture
Active Contributor
0 Kudos

What exactly is your question?

In case you need to change the date format, you could use the standard java dateformatters

Answers (3)

Answers (3)

Former Member
0 Kudos

answerd

p330068
Active Contributor
0 Kudos

Dear Vagdevimallaaa

You may use the SimpleDateFormat to change the date format based on your requirement.

Refer to [|]

Best Regards

Arun Jaiswal

Former Member
0 Kudos

Hi

Now i got time form back end.But the problem is in back end time format is in 24hrs(00:0:00),while running the application times are appearing like 12hrs format(12:00:00 AM)actually i want to display multiple times,those are coming properly but they are in 12hrs format.

To rectify that problem i tried in the following way

for (int i = 0; i < wdContext.nodeItab().size(); i++) {

//Time login = wdContext.currentItabElement().getLogin();

Time login = wdContext.nodeItab().getItabElementAt(i).modelObject().getLogin();

formatter1 = new SimpleDateFormat("hh:mm:ss a");

logintime = formatter1.format(login);

//Time loginreal = (Time)formatter1.parseobject(logintime);//while giving parse it showing error

manager.reportSuccess( "Login111111111111 ::: "+ logintime);

}

logintime is in string format,so how can i convaert string to time,i used Time loginreal = (Time)formatter1.parse(logintime);,it is returning null

How can rectify my problem?

Andrzej_Filusz
Contributor
0 Kudos

Hi!

You can use supply functions to display dates in your required format. I recommend you to read this blog:

"Supply functions in WebDynpro"

Regards,

Andrew