i'm currently developing a room booking system for college.
the problem i had now is to check the selected date against the dates in a table called HOLIDAY.
what i have in the HOLIDAY table included: start_date, end_date & event.
i'm not using the default system date format as the user require the date to be in dd/mm/yyyy format.
so what i did is the conversion which i take in each day, month and year separately and store under different variables.
now, what i'm facing is that i cant get the system to check the date accordingly.
i need to come out with a formula to cater for the checking of selected date against the start and end date of the holiday.
if the selected date doesn't fall under the holiday, i will display the rooms availability to the user. else, error message will be prompt out.
is there any suggestion on the formula i can use?
what i have is:if (strSelectedDate.Equals(strHolidayStart) == true)
** error **
if (strSelectedDate.Equals(strHolidayEnd) == true)
** error **
if (intSelectedYear == intHolidayStartYear && intSelectedYear == intHolidayEndYear)
if (intSelectedMonth == intHolidayStartMonth && intSelectedMonth == intHolidayEndMonth)
if (intSelectedDay > intH
View Complete Post