|
If your objective is to display the dates, then
pass the date objects as parameters to a SimpleDateFormat objects
eg
import java.text.*;
Assuming your date object is labelled
unformatedDate,
SimpleDateFormat sdf = new SimpleDateFormat("dd mmm
yyyy");
String formatedDate =
sdf.format(unformatedDate);
System.out.println(formatedDate);
----- Original Message -----
Sent: Thursday, January 16, 2003 12:45
PM
Subject: Date functions...
I am working with a preexisting method that calculates interest on the
number of days that have passed since the last accrual date. This method is
necessary because there are specific days of the week that interest should not
accrue. This method has two parameters, one being the last accrual date and
the other is today's date.
There is a do..while loop that is setup to loop through everyday since
the last accrual date and calculate the interest. Each time it iterates
through the loop, one day is added to the last accrual date until that date is
equal to or greater than today's date. The problem I am having is formatting
the date to zero out the hrs, minutes, and seconds. I should be looking at
whole days, because there will always be differences in the hrs and minutes.
How do I format a date to zero out the hours, minutes, and seconds?
Thanks,
Richie
|