above code not working, y is 2010 and year0 is also 2010, as per my knowledge Equal should be displayed as output, but the condition does not get equal.
Pls help me for this.
year1 =rs.fields("FinYear")
year0 = Mid(year1,1,4)'first year
year1= Mid(year1,5,4)'second year
y = Year(Now())
if y = year0 then
Response.Write "Equal"
Response.End
end if
hi
sorry i forget to write that,
"20102011" is get stored in FinYear or any other year in this format
year1 =rs.fields("FinYear")
year0 = Mid(year1,1,4)'first year
year1= Mid(year1,5,4)'second year
mon =rs.fields("iMonth")
y = Year(Now())
m = Month(Now())
if cStr(y)= year0 then
the problem is solved using cStr function.
n by using Mid function "20102011" gets seperated as 2010 and 2011