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.
Request clarification before answering.
Hi Surendra,
The reply given by mukesh is the correct one.
-Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Surendra,
You need to override the default toString() method of java.sql.Date. Use the following code -
Date date = new Date(System.currentTimeMillis())
{
public String toString()
{
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd G HH:mm:ss");
return dateFormat.format(this);
}
};
wdContext.currentConextElement.setMyDate(date);
In a much better way you can use same funtionality in caliculated attribute.
Message was edited by:
Abhilash gampa
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.