iLTC Home
Bookmark iLTC!
iLTC Google Boards

Google Groups
Receive The Code in Email!



Categories

Perl
  • Perl Tutorials Beginners

    Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

    HTML
  • HTML Tutorials



  • I love the code... dot com
    142,979

    iLoveTheCode.com
    Javascript > Javascript Tutorials How To Easy > Get Formatted Time in Javascript

    Get Formatted Time in Javascript



    To get formatted time using Javascript:

    hu = new Date();

    document.write(hu);

    Which prints something like this:
    Mon Mar 06 2006 02:42:46 GMT-0500 (EST)


    -hu is my made up variable name.
    -Date() is a built in Javascript method.
    -document.write prints to the browser.
    -see Resources below for more about time, epoch time, and formatting time.



    Free Copy and Paste Javascript Code:

    <script type="text/javascript">
    <!--

    hu = new Date();

    document.write(hu);

    -->
    </script>



    Resources:
    Getting Epoch Time in Javascript
    Formatting Time in Javascript
    Setting a Cookie using Javascript

    htmlite.com has a nice Time article


    Click HERE to comment or discuss at iLoveTheCode GOOGLE Group
    Previous Article: Getting Epoch Time in Javascript
    Next Article: Formatting Time in Javascript





    Head First HTML with CSS...Head First HTML with CSS & XHTML

    Eric Freeman, Elis...

    New $23.99

    JavaScriptJavaScript

    David Flanagan

    New $31.49

    CSS MasteryCSS Mastery

    Andy Budd, Simon C...

    New $23.85

    CSSCSS

    Eric Meyer

    New $29.69

    Learning Web DesignLearning Web Design

    Jennifer Niederst ...

    New $26.99

    HTML & XHTMLHTML & XHTML

    Chuck Musciano, Bi...

    New $29.99

    CSSCSS

    David McFarland

    New $23.09

    HTML, XHTML, and CSS, Si...HTML, XHTML, and CSS, Sixth Edition ...

    Elizabeth Castro

    New $23.09


    Of Interest:
  • Create a Subroutine in Perl
  • If, Elsif, and Else in Perl
  • To Reverse an Array in Perl
  • Check for Existing File in Perl
  • Close Window with window.close in Javascript
  • Match with a Regular Expression, REGEX, in Javascript
  • Use onLoad in Body Tag with Javascript
  • Javascript Concat - Use Concat to Join Two Arrays in Javascript
  • HTML Image
  • Make Text Bold Using HTML
  • HTML Color Codes
  • HTML Frames

  • More Articles:
  • Passing a Variable or Value to a Subroutine in Perl
  • Create or Put Items into an Array in Perl
  • What's in an Array, Index Numbers
  • Matching at the Beginning and End 2
  • onClick Javascript
  • Select All or Highlight Text Fields and Textareas Using Javascript
  • Increment a Variable in Javascript
  • Focus a Window with self.focus in Javascript
  • Mimic Typing from a Textfield in a Textarea with Javascript
  • HTML Font Code
  • HTML Space
  • HTML Codes
  • HTML Color Codes

  • Search iLTC w/ Google





    Recent Articles

  • Javascript Focus Form Field
  • Javascript Lowercase Text
  • Javascript Uppercase Text
  • Javascript Superscript Text
  • Javascript Subscript Text
  • Make Text Blink Using Javascript
  • Make a String into a Link in Javascript
  • Javascript Italics Text
  • Javascript Bold Text
  • Javascript Redirect
  • HTML Frames
  • HTML Color Chart
  • HTML Link
  • Javascript Status Bar








  • Perl Programming - Javascript Programming - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006 iLoveTheCode.com


    Contact Chris | About this Site


    439,744
    Counter by iLoveTheCode.com


    Last Modified: Friday, 23-Jun-2006 07:23:13 EDT