Link to home
Create AccountLog in
Avatar of ap458889
ap458889

asked on

date question

i have two strings.
String date0 = "2005-01-16";
String today = "2005-04-09";

How can i calculate todays date - 2 days ?
and how can i compare the result with date0.

I want to pring  "before  today - 2 days" or "after today - 2 days".

Thx
Avatar of sudhakar_koundinya
sudhakar_koundinya

this example will help you

http://www.javaalmanac.com/egs/java.util/GetAge.html

Regards
Sudhakar
ASKER CERTIFIED SOLUTION
Avatar of zzynx
zzynx
Flag of Belgium image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer