I am new to ASP programming and I am trying to get an existing website to work. I have created the following function to get the day: function nrDate() nrDate = DAY(Date()) end function But when I use the page it gives the following runtime error: Microsoft VBScript runtime error '800a000d' Type mismatch: 'DAY' I have googled the problem for hours but cannot find anything that may be helpfull. Does anyone have any ideas because this is getting quite urgent and I cannot move forward without this function. Best regards Nigel
yep.. also good references for learning could be found on w3schools.. http://www.w3schools.com/vbscript/vbscript_ref_functions.asp on your function.. if you want to get the DAY "name" you'll have to use the "WeekdayName" function passing it the "Weekday" function. Weekday function will give you the number of the the current day starting from 1 to 7. 1 behing Sunday ( by default ) i.e weekdayname(weekday) will return "Thursday" ( according my time off course.. estern that is ) Checking your function: function nrDate() nrDate = DAY(Date()) end function I guess you wanted to get the actual number of the month? so your ok with with what you did.. but just get rid of the parentheses on the Date parameter in the DAY function.. function nrDate() nrDate = DAY(Date) end function Should work fine.. ( did'nt test it thought.. ) but should be just fine.. Cheers