Parsing Time (or Text time) to Long

How can I parse time text to long ?Or time text to java.util.Date ?Let's say I have this:String time1 = "12:45:20";How can I put that in a java.util.Date ?
[216 byte] By [Franziska] at [2007-11-26 19:51:25]
# 1
Use [url= http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html]SimpleDateFormat[/url].
DrLaszloJamfa at 2007-7-9 22:41:30 > top of Java-index,Java Essentials,Java Programming...
# 2
I dont need a string, I need a long number of it.
Franziska at 2007-7-9 22:41:30 > top of Java-index,Java Essentials,Java Programming...
# 3
Er, what long? Date has the method long getTime() <quote>Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.</quote>
DrLaszloJamfa at 2007-7-9 22:41:30 > top of Java-index,Java Essentials,Java Programming...
# 4
Can I do this?java.util.Date myTime = new java.util.Date("14:30:55");That's what I am talking about.But, thanks anyway for your answers.
Franziska at 2007-7-9 22:41:30 > top of Java-index,Java Essentials,Java Programming...
# 5
> Can I do this?Try it and see.
DrLaszloJamfa at 2007-7-9 22:41:31 > top of Java-index,Java Essentials,Java Programming...