Java Date
// Get today as a Calendar
Calendar today = Calendar.getInstance();
// Subtract 1 day
today.add(Calendar.DATE, -1);
// Make an SQL Date out of that
java.sql.Date yesterday = new java.sql.Date(today.getTimeInMillis());
Labels: Java
Labels: Java
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home