A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java 8 in Action
this week in the
Java in General
Joined: Jan 08, 2010
Aug 17, 2010 22:48:15
I am getting the time from the calander like below
time = "16:10";
How would I convert to 1610?
How would I remove the : from 16:10?
Joined: Jun 19, 2010
Aug 17, 2010 23:10:17
If you are starting with a
object i would use a date format ie.
java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("hhmm"); format.format(calendar.getTime());
If you are convinced you need to use a string just use the replace method on the String object ie.
String time = "12:20"; time = time.replace(":", "");
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
how do i compare row by row
Generate random strings
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014