473,569 Members | 2,701 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_function s.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_da te(incoming_dat e)
dim extract_day, extract_month, extract_year, mysql_date
extract_day=day (incoming_date)
extract_month=m onth(incoming_d ate)
extract_month=m ake_double_digi t_month(extract _month)
extract_year=ye ar(incoming_dat e)
mysql_date=extr act_year & "-" & extract_month & "-" & extract_day
make_current_da te=mysql_date
end function

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

the code for the day_month_selec tor.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">Janua ry</option>
<option value="2">Febru ary</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">Augus t</option>
<option value="9">Septe mber</option>
<option value="10">Octo ber</option>
<option value="11">Nove mber</option>
<option value="12">Dece mber</option>
</select>
Year: <select name="year">
<%
dim one_year
for one_year = 0 to 8
Response.Write "<option value=" & Chr(34) & Year(DateAdd("y yyy",one_year,D ate)) & Chr(34) & ">" & Year(DateAdd("y yyy",one_year,D ate)) & "</option>" & vbCrLf
next
%>
</select>
--------------------------------------------------------------------------------------------


Any ideas would be greatly appreciated.
Feb 2 '07 #1
3 8149
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(xAs Date)

on error resume next

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

if isDate(xStringA sDate) 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
11487
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 asp - I'm just trying to get this site working on my server! I think the offending lie is
7
15797
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 have a page that allows users to type in the info (actually a calendar pop-up allows me to make sure they do it in the correct format), into a...
1
4249
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, dsclientid, dsprincipleid, dsremarks, dsadminlock ) Values (5,'2/16/2005','sacc',1,1,'cdssd','not') This query runs fine on query analyser, but when I...
3
30876
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
3827
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! Error Message: Microsoft VBScript runtime error '800a01f4' Variable is undefined: 'PageBottom' /Default.asp, line 29
1
4065
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 this:
1
3034
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 amount is 0 <%else%> Amount : <%=rst_rs("Amount")%> <% end if%>
2
2496
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 why it happens as long as i hv only simple code dbEnq.RecordSource = " select * from Enquirer where Date > '" & Format("MM/dd/yyyy", txtDate1.Text)...
4
4666
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' Type mismatch /ops/eus/clrm/ck_avail.asp, line 243 The code is:
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7968
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.