File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes how to convert string to int in jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how to convert string to int in jsp?" Watch "how to convert string to int in jsp?" New topic
Author

how to convert string to int in jsp?

amanda wu
Greenhorn

Joined: Mar 16, 2003
Posts: 25
or how to convert string to calender object ?
i want to convert dates (yy/mm/dd/hr/min/sec) to unix time
Asher Tarnopolski
Ranch Hand

Joined: Jul 28, 2001
Posts: 260
use the standart methods from api ... like
Integer.parseInt(String) and so on...


Asher Tarnopolski
SCJP,SCWCD
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12785
    
    5
If you have a date string in a nice consistent format, you can use the java.text.SimpleDateFormat class to parse it into a Date object. You can use the Date object method getTime() to get the UNIX milliseconds.
SimpleDateFormat is not all that simple but it is very general. For example..

can parse a date string like this:
"11/25/02 3:47:17 PM CST"
Bill
amanda wu
Greenhorn

Joined: Mar 16, 2003
Posts: 25
many thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to convert string to int in jsp?