Hi, I am using the following code:
<% IF bookingdate < StartDate THEN
errorForm "Booking Date entered is before Start of Season"
END IF %>
<% IF bookingdate > EndDate THEN
errorForm "Booking Date entered is after End of Season"
END IF %>
What I am comparing is Dates held within a database and a date entered by the user. The date entered by the user is a text string as 13/04/00 this is not formatted as a date. The date held in the database is set to text and is entered in the same way. I am comparing the date entered by the user to the StartDate and EndDate in the database but get incorrect results. I need something that will convert both strings maybe to a value then compare these.
Any Suggestions welcome.
Thanks.
<% IF bookingdate < StartDate THEN
errorForm "Booking Date entered is before Start of Season"
END IF %>
<% IF bookingdate > EndDate THEN
errorForm "Booking Date entered is after End of Season"
END IF %>
What I am comparing is Dates held within a database and a date entered by the user. The date entered by the user is a text string as 13/04/00 this is not formatted as a date. The date held in the database is set to text and is entered in the same way. I am comparing the date entered by the user to the StartDate and EndDate in the database but get incorrect results. I need something that will convert both strings maybe to a value then compare these.
Any Suggestions welcome.
Thanks.