on 01-30-2008 12:33 PM
hi, recently i code a web service as below
public boolean createNew(String staffID,
Date startDate,
Date endDate){
<code to add to database>
return true
}
but the problem is when i try to consume the web service
it will auto fill the startDate and endDate with this data
startDate: "2008-01-30T10:00:50.342Z"
endDate: "2008-01-30T10:00:50.342Z"
so may i know issit possible to change it to just only accept 2008-01-30? or as this format YYYY-MM-DD.
or i should not use Date for startDate and endDate?
Regard
Jia Jun
Hi,
Create date passing String in format yyyy-mm-dd.
Date startDate= new Date("yyyy-mm-dd");
Date endDate= new Date("yyyy-mm-dd");
public boolean createNew(String staffID,
startDate,
endDate){
<code to add to database>
return true
}
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siva,
may i know how to do it?
as i did try to code in the begining by using String for my startDate and endDate. and it is able to consume, but currently if i change the startDate and endDate to Date. it is still able to consume when i change the date from "2008-01-30T10:00:50.342Z" to just "2008-01-30". but when i try to use adobe interactive form. the startDate and endDate i am using the Date/Time Field Type. and the Data Format is as Date. so it will just return "2008-01-30" only.
the part where i have error is when i try to do a parameter mapping from the interactive form to the web service. it is unable to map as they keep prompting that cannot map a Date to a Time Stamp.
that is why i stuck at this part.. so i try to find out how to overcome this errors now..
Regards
Jia Jun
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.