Hi, I need to write a one year expiration date function. Any sample code would be appreciated, I don't know either to use the date calendar or the SimpleDateFormat? Thanks in advance for any help.
What does these parameters mean for: expires.set(2004,0,1,0,0,0); The only one that I can guess is 2004. I want to set the expire date one year from the current date.
Originally posted by Chris De Vries: You can do something like:
Which will cause the software to expire on January 1, 2004. Chris
The Java API docs are a good place to go if you want to find out more about a method call. Calendar.set(int,int,int,int,int,int) is documented there. The arguments are year, month (starting with 0), date, hour, minute, and second. [ October 06, 2003: Message edited by: Chris De Vries ]
The date field do they mean the day of the month. Thanks for your reply. But, I'm using jdk1.3.1 and not jdk1.4, can I still use the set calendar function.
Originally posted by Chris De Vries: The Java API docs are a good place to go if you want to find out more about a method call. Calendar.set(int,int,int,int,int,int) is documented there. The arguments are year, month (starting with 0), date, hour, minute, and second. [ October 06, 2003: Message edited by: Chris De Vries ]