Create a Calendar object with current date in format yyyy-mm-dd
posted 3 years ago
I have a schema in one of the element accepts only Calendar date. The requirement is to set current date in this field in the format yyyy-mm-dd. But every time create a Calendar instance and format it using SimpleDateFormat, I get the output as "2013-09-18-04:00" . Calendar always appends the timezone value along with the date.
I tried to convert the SoapElement to String and then search for the element from the string and then modify the value to trim of the timezone value. But could'nt suceed in that.
Did anyone else face similar issue.? Please help to find a solution for this .