Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Create a Calendar object with current date in format yyyy-mm-dd  RSS feed

Ullas padavan
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

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 .

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!