on 08-16-2006 5:54 AM
Hi all,
I am using web service model in a dynpro application. In the response of web service there is a date field. When blank response is returned, all fields (except date) are blank, however the date contains value '0002-11-30T08:00:00.000Z' ,when web service is tested in web service navigator.
When this is linked with dynpro context, and application is run, the actual value displayed in view is '11/30/0002'.
How can we display just blank instead of this absurd date ?
Thanks,
- Shankar
Hi,
Check the condition and set the date attribute accordingly
if(absurd date)
set the date attribute accordingly
Regards
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all for your help.
Saravanan, to add into your solution, I used the following
if (
wdcontext
.<CurrentContextElement>()
.get<DateAttribute>()
.getTime()
.getYear() == -1898 )
then ( assign null )
This is because in java.date format 1900 gets subtracted from year value. So in case of blank, '0002' is the year value received (as mentioned in my question).
Hence 2 - 1900 = -1898 is used.
Regards,
- Shankar.
Hi
Set the null to the attribute fo the Date
wdContext.current<node>Element().set<Date>(null);
Kind Regards
Mukesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.