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. No Profile Picture
    php newbie
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    544
    Rep Power
    37
    wrong forum, you wanna try the javascript one instead of the asp one.
    "They have the internet on computers now" - Homer
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    133
    Rep Power
    12
    Thanks homerdooh, I posted it to the Java Forum

IMN logo majestic logo threadwatch logo seochat tools logo