Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Removing Z/z and time from Calender date

 
reachsudha sudhakar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I observe that in the Java Calender date when mapping from one calender date eleemnt to another calender date element I am getting calender date appending z or time at the end of the date value. I want to know how to truncate/remove the Z and time from calender date:

EX:

<NewArrival date="2011-05+01:00">
<NewArrival date = date="2011-01Z">

These red coloured needs to be removed from calender date.

Please explain how to do that to remove them from calender date.

Please give the reply soon, its urgent.

Thanks.
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi reachsudha and welcome to the Ranch!

We like it if you BeForthrightWhenCrossPostingToOtherSites. Also, EaseUp!
 
reachsudha sudhakar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some one please give a reply on this requirement please.
 
Swastik Dey
Rancher
Posts: 1625
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not very sure. But can't you use some standard java parsers to retrieve the values and then use String bases api's to remove the part.
 
reachsudha sudhakar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swastik Dey wrote:Not very sure. But can't you use some standard java parsers to retrieve the values and then use String bases api's to remove the part.


Not able to retrieve that date part alone from calder date or apply parse/dateformat methods on calender, if possible can you give an example as how we can do that..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic