date problem

Results 1 to 6 of 6

Thread: date problem

  1. #1
    angie Guest

    Default date problem

    &nbsp;<BR>HI...<BR><BR><BR>I got the following error:<BR><BR><BR><BR>Microsoft VBScript runtime error &#039 800a000d&#039 <BR><BR>Type mismatch: &#039[undefined]&#039 <BR><BR><BR><BR>In my code I just wrote:<BR>DateRequested=CDate(Request.QueryString( "date"))<BR>myDay = Day(DateRequested)---------------error line<BR><BR><BR>and the date requested was for example 30/08/99<BR>I want to get the day, month and year separately....<BR>Why do I get thnast error????<BR>thanks for ur help!<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    19

    Default RE: date problem

    I think that the problem is because DateRequested is not a date.<BR>Be sure that Request.QueryString("date") is a string containing a date.<BR><BR>Bye.<BR>

  3. #3
    Randy Edmonds Guest

    Default RE: date problem

    Looks like your example should work. <BR>Unless request.querystring("date") is empty.

  4. #4
    angie Guest

    Default RE: date problem

    Hi...<BR><BR>request.QueryString("date") is not empty...I checked already...when i reponse.write the date, I can see that the date has been passed on the other page....but the error is still there....<BR><BR>let me purposely put the date...here&#039s the code:<BR><BR>************************************* *********************<BR>date_="31/08/99"<BR> <BR>Response.Write vbTab & vbTab & "&#060;TD BGCOLOR=#00ffff&#062;&#060;A HREF=""displayUserLog.asp?date_=" & date_ & """&#062;&#060;FONT SIZE=""-1""&#062;" & iCurrent & "&#060;/FONT&#062;&#060;/A&#062;<BR><BR>&#060;/TD&#062;" <BR>********************************************** **************** <BR>Now in file displayUserLog.asp, I have:<BR><BR>************************************* ****************<BR>daterequested = CDate(Request.QueryString("date_"))<BR>response.wr ite daterequested<BR>myDay = Day(daterequested) &#039&#039&#039&#039&#039&#039error line 76&#039&#039&#039&#039&#039<BR>....<BR>*********** ******************************************** <BR><BR>error msg:<BR><BR>31/08/99 &#039&#039&#039this is the daterequested&#039&#039&#039&#039&#039&#039&#039<B R>Microsoft VBScript runtime error &#039 800a000d&#039 <BR><BR>Type mismatch: &#039[undefined]&#039 <BR><BR>/angie/admin/displayUserLog.asp, line 76 <BR><BR>


  5. #5
    Join Date
    Dec 1969
    Posts
    19

    Default RE: date problem

    Hello angie.<BR><BR>Try putting the following code:<BR><BR>daterequested = CStr(Request.QueryString("date_"))<BR>myDay = Day(daterequested) &#039 The Day() funcion accepts strings<BR> &#039 too.<BR><BR>Well, bye bye

  6. #6
    Vivek Nama Guest

    Default date problem No error !!!!!!!!!

    the following script executed both with cdate and cstr functions<BR>-------------------- default.asp -------------------<BR>&#060;%<BR>Response.Write vbTab & vbTab & "&#060;A HREF=""one.asp?date_=30/08/99""&#062;&#060;FONT SIZE=""-1""&#062;one.asp&#060;/FONT&#062;&#060;/A&#062;"<BR>%&#062;<BR>-------------------- one .asp ----------------------<BR>&#060;%<BR>response.write "this is the page one <BR>"<BR>daterequested = CDate(Request.QueryString("date_"))<BR>response.wr ite daterequested & "<BR>"<BR>myDay = Day(daterequested)<BR>response.write myDay & "<BR>"<BR>newdaterequested = CStr(Request.QueryString("date_"))<BR>response.wri te newdaterequested & "<BR>"<BR>newmyDay = Day(newdaterequested) <BR>response.write newmyDay & "<BR>"<BR>%&#062;<BR>-------------------- display ----------------------<BR>this is the page one <BR>8/30/99<BR>30<BR>30/08/99<BR>30<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •