I cannot get the add function in Blackberry Java.
// Date
private static DateFormat dateFormat = new SimpleDateFormat(
"yyyy-MM-dd hh:mm:ss");
private static Calendar cal = Calendar.getInstance();
public static final String date = dateFormat.format(cal.getTime())
.toString();
The cal variable don’t have add function because I want to reduce 1 day from current date.
The source stated that used cal.add(Calendar.DATE, -1);.
Try this:
Updated, based on ecb0628‘s answer and paulkayuk‘s comment.
Check Calendar, getTimeInMilis(), setTimeInMillis(long millis), and DateTimeUtilities.ONEDAY.