trying to split time....PLease look?

Results 1 to 2 of 2

Thread: trying to split time....PLease look?

  1. #1
    Raquel Anne Guest

    Default trying to split time....PLease look?

    I AM GETTING THIS AS AN ERROR:<BR>**************************************** *********<BR>* Microsoft VBScript runtime error &#039 800a000d&#039 *<BR>* *<BR>* Type mismatch: &#039[string: " 03:19"]&#039 *<BR>* *<BR>* /Untitled-2b.asp, line 6 *<BR>********************************************* ****<BR>AND HERE IS MY CODE:<BR><BR>&#060;% @LANGUAGE="VBSCRIPT" %&#062;<BR><BR>&#060;% itimer=Request.Form("disp1")<BR>dim var1<BR>var1 = split(itimer,":")<BR>If itimer(1) &#062; 30 Then<BR>itimer(0) = itimer(0) + 1<BR>itimer(1) = 00<BR>itimer = itimer(0) & ":" & itimer(1)<BR>Else<BR>itimer(0)=itimer(0)<BR>itimer (1) = 00<BR>itemer = itimer(0) & ":" & itimer(1)<BR>End If<BR><BR>%&#062;<BR>&#060;html&#062;<BR>&#060;hea d&#062;<BR>&#060;title&#062;Untitled Document&#060;/title&#062;<BR>&#060;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&#062;<BR>&#060;/head&#062;<BR><BR>&#060;body bgcolor="#FFFFFF"&#062;<BR>&#060;input type="text" name="textfield" value=&#039&#060;%response.write(itimer)%&#062;&#0 39&#062;<BR>&#060;/body&#062;<BR>&#060;/html&#062;<BR><BR><BR>any help would be greatly, greatly and lovingly appreciated 8o)<BR>Thanks<BR>Raquel Anne<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    41

    Default RE: trying to split time....PLease look?

    When you do var1 = split(itimer,":")<BR>you set var1 as the array. so doing itimer(x) will not work.<BR>So use var1(x) as your array and then use itimer - itimer = var1(0) & ":" & var1(1)

Posting Permissions

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