Skip to Content
author's profile photo Former Member
Former Member

Web Services Date Errors

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 12:41 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.