cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

I am developing a webdynpro application. In this I want a field to contain Date and Time values. I tried by declaring it as Date field. But I am unable to enter time into this. Is there a way to enter both Time and Date.

Please let me know the solution.

Thanks and Regards,

D.NagaSurendra.

0 Likes
View Entire Topic
Former Member
0 Likes

Hi,

Try this

Calendar cal = Calendar.getInstance();

int hour12 = cal.get(Calendar.HOUR);

int hour24 = cal.get(Calendar.HOUR_OF_DAY);

int min = cal.get(Calendar.MINUTE);

int sec = cal.get(Calendar.SECOND);

int ms = cal.get(Calendar.MILLISECOND);

int ampm = cal.get(Calendar.AM_PM);

wdContext.currentContextElement().setTime(hour12+":" +min +":" +sec);

Regards, Anilkumar