Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Removing Z/z and time from Calender date  RSS feed

 
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: 5167
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: 1812
15
Android Eclipse IDE 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..
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!