File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String

 
anvi kon
Ranch Hand
Posts: 133
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am getting the time from the calander like below

String time = "16:10";

How would I convert to 1610?

How would I remove the : from 16:10?

Thanks
 
Steve Harney
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If you are starting with a java.util.Calendar object i would use a date format ie.



If you are convinced you need to use a string just use the replace method on the String object ie.



Steve
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic