Jump to content

Search the Community

Showing results for tags 'getdate'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. If you look in the DEFINITION and USAGE paragraph, you'll see that GETDATE() is being used instead of GETUTCDATE().
  2. So I've gotten my code to display the correct current date in the 1st text box, but then when I choose one of the radio buttons to choose my "Pick-Up" date, the 2nd text box does not display the date. Basically, 1st box should show current date, 2nd box should show the date chosen from the radio buttons (imagine dropping off film that needs developed and you are choosing whether you want it 1 day, 2 days, or 3 days processing). I am including my full code so you can see what I'm doing. Can someone please show me what I'm doing wrong... ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <script type="text/javascript"> /*<![CDATA[*/ function my_curr_date() { var currentDate = new Date() var day = currentDate.getDate(); var month = currentDate.getMonth() + 1; var year = currentDate.getFullYear(); var my_date = month+"-"+day+"-"+year; document.getElementById("dateField").value=my_date; } function orderReady(orderTime){ dateToday.setDate(dateToday.getDate()+orderTime); var ready=dateToday.getMonth()+"/" +dateToday.getDate()+"/"+dateToday.getFullYear(); document.getElementById("duedateField").value=due_date; } /*]]>*/ </script> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <body onload='return my_curr_date();'> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <p>Item<br /> <input type="radio" name="item" value="print_5x7" onclick="orderReady(1)" />5x7 Prints(1 day) <input type="radio" name="item" value="poster" onclick="orderReady(1)" />Poster (1 day) <input type="radio" name="item" value="mug" onclick="orderReady(2)" />Coffee Mug (2 days) <input type="radio" name="item" value="shirt" onclick="orderReady(3)" />T-shirt (3 days)</p> <p>Today's Date<br /> <input type='text' name='dateField' id='dateField' value='' /><br /> Pick-up Date<br /> <input type='text' name='duedateField' id='duedateField' value='' /></p>
×
×
  • Create New...