SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do you display current date and time?

    I just want to be able to display the current date and time. Does that require coding, or is there a simple way to do it. I would like the output to look something like this...

    Monday
    October 2, 2006
    2:51 PM

  2. #2
    SitePoint Member sabinega's Avatar
    Join Date
    Jan 2006
    Location
    Vancouver
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    date and time

    You can do this with a java script.
    you should be able to find something under this web page:

    http://www.hotscripts.com/JavaScript...ime/index.html

    Be aware some of the programs are not totally free. Or make a online search for a java applet date and time.

    Good luck

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    FL
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it's Rails, there's definitly an easy way to do it ;-)

    Try,
    Code:
    <%= Time.now %>
    ....You could also format it by messing around with
    Code:
    <%= Time.now.strftime("%B %d, %Y") %>
    .

    Let me know if that was of any help. Good Luck!
    Eric A.
    Founder and CEO, XMG Networks, Inc.
    XMG Services: Web 2.0 Photo Management and Sharing | Web Hosting
    Personal Blog: From Two 2 Twelve


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •