please explain what type of calculation you want to do with your date time
kindly be more specific with your problem.
One solution which i can give you is the use of java.util.DateFormat class
<%@ page import="java.text.*,java.util.*" session="true"%>
<head><title>Date Format Example</title></head>
DateFormat date = DateFormat.getDateInstance
String result = date.format(new Date());
<b>Today's date is: <%= result %></b>
The DateFormat class also provides different styles like FULL, LONG, MEDIUM, SHORT.
FULL- it specifies completely, such as Wednesday, July 9, 2008 AD or 6:13pm.
LONG- it specifies as July 9, 2008 or 6:13pm.
MEDIUM - it specifies as Jul 9,2008.
SHORT - it specifies as 09.07.08 or 6:13pm