473,505 Members | 13,982 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft VBScript runtime error '800a000d' - mismatch date

3 New Member
I have inherited an ASP site and am new to ASP. Part of the site allows the client to update event information about their centre. When they try to add a new event, the following error occurs:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'incoming_date'
includes/common_functions.asp, line 113

but I can't figure out where to make the correction.

The code that contains the error is below. Line 113 is : extract_day=day(incoming_date)

function make_current_date(incoming_date)
dim extract_day, extract_month, extract_year, mysql_date
extract_day=day(incoming_date)
extract_month=month(incoming_date)
extract_month=make_double_digit_month(extract_mont h)
extract_year=year(incoming_date)
mysql_date=extract_year & "-" & extract_month & "-" & extract_day
make_current_date=mysql_date
end function

Where the date is selected, this code is next to the date selector:
<!-- #include file="../includes/day_month_selector.asp" -->

the code for the day_month_selector.asp is as follows:
Day: <select name="day">
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7">07</option>
<option value="8">08</option>
<option value="9">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
Month: <select name="month">
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
Year: <select name="year">
<%
dim one_year
for one_year = 0 to 8
Response.Write "<option value=" & Chr(34) & Year(DateAdd("yyyy",one_year,Date)) & Chr(34) & ">" & Year(DateAdd("yyyy",one_year,Date)) & "</option>" & vbCrLf
next
%>
</select>
--------------------------------------------------------------------------------------------


Any ideas would be greatly appreciated.
Feb 2 '07 #1
3 8144
scripto
143 New Member
incoming_date MUST be a real date to use the day() function.
That is probably why you are getting the error.
Make sure incoming_date is a real date.
Feb 2 '07 #2
gateshosting
25 New Member
Probobly the most simple way is to write a function to check the date first...

function isThisADate(xAsDate)

on error resume next

if isnull(xAsDate) then
isThisADate = false
exit function
end if

if isDate(xStringAsDate) then
isThisADate = true
exit function
end if

if err.number <> 0 then
isThisADate = false
end if

exit function

Any type mismatch means that the variable is of the wrong type. So if you do 1 + "A", then it will throw a type mismatch. Unless of course A = Number.

I have functions that help, like nullToZero(xVal) which if xVal is null or "", it will return 0, that way you don't get a type mismatch for null values. You can do this for each type.

Best regards,

Michael C. Gates
Feb 4 '07 #3
easter
3 New Member
thank you very much for your help....I think I'll need to get someone in to work on this as I'm not sure what to do from your descriptions which would be straight forward to someone who knew ASP better than I do! thank you again.
Feb 4 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
11479
by: jimbly | last post by:
Hello, can someone help! I am getting an error: Microsoft VBScript runtime error '800a000d Type mismatch /bps/srch-detail.asp, line 137 I didn't write this asp - I know very little about...
7
15783
by: middletree | last post by:
I've been messing with this for hours, and have been to various sites, including Aaron's site, and am truly stumped. The short version: in SQL Server, the 4 fields in question are datetime. I...
1
4243
by: g_sharad | last post by:
I guess this is a very old problem, but this keeps bugging many ppl in many ways. I am facing the problem with the SQL query >>>> Insert Into DailySalesReport (hoautoid, dsdate, dsreport,...
3
30848
by: Snow | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' The error happened at this line: if session("systemIdCount" & arrSystems(iLoop)) 0 The code like this:
5
3824
by: Weenizzle | last post by:
I'm new at VB. My friend actually coded this and he's away for awhile. I've been sitting for awhile trying to figure out what I've done wrong. I'm decent at web design but not with VB. Please help! ...
1
4061
by: monika | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' /OnlineLIB/BNosearch1.asp, line 32 The error happened at this line:bookno = chr(bookno) The code like...
1
3030
by: makinha | last post by:
Hello, I got a type mismatch error on my script when compare the null value collect from the sql server. From the beginning, I code as below: <% If (rst_rs("Amount"))="" then %> Sorry the...
2
2489
by: tiiim | last post by:
hi all i created two textboxes to insert date and a button..i hv this following code for that button..but when i ran error msg shows error like 'runtime error 13' & type mismatch..i hv no idea...
4
4663
by: ghanson | last post by:
I have started to have problems with my code. On one server the code works fine and on another (which is the one I need to run the scrpt on) I get Microsoft VBScript runtime error '800a000d' ...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7303
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7018
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5613
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.