Thread: Dates

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    133
    Rep Power
    12

    Dates


    Hi,

    A newbie but making some headway into the basics, I have a problem I'm trying to find the difference between 2 dates in a form:

    <script language="JavaScript" type="text/JavaScript">
    <!--
    <!-- Begin
    function calc3() {
    numtextfield3 = (document.Form1.textfield1.value -
    document.Form1.textfield2.value);
    document.Form1.textfield3.value = numtextfield3;
    }
    // End -->
    //-->
    </script>

    I keep getting an error what I want is if:

    textfield1 = 12/03/03 12:05 and
    textfield2 = 12/03/03 11:10

    I would like textfield3 the differnce between the dates.

    Any ideas?

    Thanks

    Sanj
  2. #2
  3. kill 9, $$;
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2001
    Location
    Shanghai, An tSín
    Posts
    6,898
    Rep Power
    3887
    This is the wrong forum for that question. Please post to the HTML/CSS/JavaScript forum. Java and JavaScript are very different.

    ~ishnid
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    133
    Rep Power
    12
    OK - Sorry !

IMN logo majestic logo threadwatch logo seochat tools logo