Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Basic JavaScript Date and Time Functions

By Will Bontrager
2004-08-12


The Printing

To print the date and time, use JavaScript to call the getCalendarDate() and getClockTime() functions. Then print the strings of characters they return. Example:

<script type="text/javascript" language="JavaScript"><!—
var calendarDate = getCalendarDate();
var clockTime = getClockTime();
document.write('Date is ' + calendarDate);
document.write('<br>');
document.write('Time is ' + clockTime);
//—></script>


Tutorial Pages:
» Basic JavaScript Date and Time Functions
» How To Extract Information From that Date Object
» The Date
» The Time
» The Printing
» The Complete Working Example


Copyright 2004 Bontrager Connection, LLC


 | Bookmark
Related Tutorials:
» JavaScript Debugging Techniques with Firebug
» Striped Tables Using JavaScript
» Opening PDFs in a New Window with JavaScript
» Essential Javascript -- A Javascript Tutorial
» Submit Forms Conditionally using JavaScript
» How to Setup a Randomising Function

Ask A Question
characters left.