to avoids conversion between SimpleDateformat and Date (or Calendar) vice versa
java.util.Calendar instance allows that
cal.add(Calendar.DATE, +14);
, java.util.Date too (but long value in milisec)
mKorbel
Veteran Poster
1,141 posts since Feb 2011
Reputation Points: 480
Solved Threads: 224
you had logical error only remove anything about SimpleDateFormat, isn't it
mKorbel
Veteran Poster
1,141 posts since Feb 2011
Reputation Points: 480
Solved Threads: 224
Is the + necessary? If so that was my mistake when I tried doing it that way. The error I got was an incompatible types error. I'll try it again tomorrow with +14 and hopefully that solves it. Why must it have a + though?
No, the + is absolutely NOT necessary anywhere in Java.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Slimmy
Junior Poster in Training
71 posts since Oct 2010
Reputation Points: 11
Solved Threads: 11