vcherubini
Programmer
Hello:
I've got a value in a database stored as a string but its in the form of a date like 7/08/02. It has to be stored as a string because its in a configuration table and the other values can be strings as well, so its just easier to make it a date.
I load the value from the database and convert it into a date subtype with the Cdate function. That works, I think. However, when I try to compare the dates, I get an error. Does ASP not have the ability to compare dates? I would assume so since you can perform mathematical operations on them, or am I just doing something wrong?
[tt]
db_date = db_connection_obj("config_value" ' this gets the date
db_date = Cdate(db_date)
if (db_date < date) then ' i get the error here
response.write("thing has ended"
else
response.write("thing is still going"
end
[/tt]
Thanks in advance for any help provided.
-Vic vic cherubini
krs-one@cnunited.com
I've got a value in a database stored as a string but its in the form of a date like 7/08/02. It has to be stored as a string because its in a configuration table and the other values can be strings as well, so its just easier to make it a date.
I load the value from the database and convert it into a date subtype with the Cdate function. That works, I think. However, when I try to compare the dates, I get an error. Does ASP not have the ability to compare dates? I would assume so since you can perform mathematical operations on them, or am I just doing something wrong?
[tt]
db_date = db_connection_obj("config_value" ' this gets the date
db_date = Cdate(db_date)
if (db_date < date) then ' i get the error here
response.write("thing has ended"
else
response.write("thing is still going"
end
[/tt]
Thanks in advance for any help provided.
-Vic vic cherubini
krs-one@cnunited.com