between todays date and June 15 2009 ---I need to display page1.htm
after june 15 2009 I need to display page2.htm
here is what I have done: get
month =Integer.parseInt(sdf.format(currdate)); day =Integer.parseInt(sdf.format(currdate)); year =Integer.parseInt(sdf.format(currdate));
if( (month>=6)&& (day>=1) &&(year!=2008)){ show page1.htm else show page2.htm
This is not working if i have current date as Jan 11 2010
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
9
posted
0
Originally posted by shah rah: I need to display page depending on dates
between todays date and June 15 2009 ---I need to display page1.htm
after june 15 2009 I need to display page2.htm
here is what I have done: get
month =Integer.parseInt(sdf.format(currdate)); day =Integer.parseInt(sdf.format(currdate)); year =Integer.parseInt(sdf.format(currdate));
if( (month>=6)&& (day>=1) &&(year!=2008)){ show page1.htm else show page2.htm
This is not working if i have current date as Jan 11 2010
You're calling the same methods with the same data to calculate month, day and year. Won't this make month, day and year all have the same value ?
Joanne
shah rah
Ranch Hand
Joined: Jan 04, 2007
Posts: 124
posted
0
my current date is like 2008-12-03-00.00.00
I am extracting month day and year from the above
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
9
posted
0
Originally posted by shah rah: my current date is like 2008-12-03-00.00.00
I am extracting month day and year from the above
I would expect these three lines of codeto set month, day and year to the same value, so the first thing you should check is whether the values of those 3 variables are what you expect them to be. [ December 03, 2008: Message edited by: Joanne Neal ]