How to add or subtract a date in java? For example, java.sql.Date and is formatted as follows: yyyy-MM-dd, how can I add in 5 months? I saw in some tutorial that they use Calendar , is it possible to set a date on it? Please, help.
Example: 2012-01-01 when adding 5 months will be 2012-06-01 .
PS: I am a .Net programmer and am slowly learning the Java environment.
java date datetime
John woo
source share