jasonhuibers
Programmer
Using vbscript I want to use this condition:
lYear = Year(Date())
if date() >= "01/01" & "/" & lYear and date() < "04/01/" & "/" & lYear then
var2 = "01/01" & "/" & lYear
elseif date() >= "04/01" & "/" & lYear and date() < "07/01/" & "/" & lYear then
var2 = "04/01" & "/" & lYear
elseif date() >= "07/01" & "/" & lYear and date() < "10/01/" & "/" & lYear then
var2 = "07/01" & "/" & lYear
elseif date() >= "10/01" & "/" & lYear and date() <= "12/31/" & "/" & lYear then
var2 = "10/01" & "/" & lYear
end if
var2 = cdate(var2)
However todays date does not pass through any of these conditions... var2 should return 10/01/2008 because todays date is between 10/01/2008 and 12/31/2008
lYear = Year(Date())
if date() >= "01/01" & "/" & lYear and date() < "04/01/" & "/" & lYear then
var2 = "01/01" & "/" & lYear
elseif date() >= "04/01" & "/" & lYear and date() < "07/01/" & "/" & lYear then
var2 = "04/01" & "/" & lYear
elseif date() >= "07/01" & "/" & lYear and date() < "10/01/" & "/" & lYear then
var2 = "07/01" & "/" & lYear
elseif date() >= "10/01" & "/" & lYear and date() <= "12/31/" & "/" & lYear then
var2 = "10/01" & "/" & lYear
end if
var2 = cdate(var2)
However todays date does not pass through any of these conditions... var2 should return 10/01/2008 because todays date is between 10/01/2008 and 12/31/2008