+ Reply to Thread
Results 1 to 3 of 3

Thread: date format
      
   

  1. #1
    omjo is offline Corporal
    Join Date
    May 2007
    Posts
    10

    Default date format

    Hi,

    how do i insert date in the screen to by updated automatically. this so my visitors can see what date it is today.

    JOhan

  2. #2
    Join Date
    Feb 2006
    Location
    Kings Lynn, Norfolk (UK)
    Posts
    8,719

    Default Re: date format

    Hi, try poping this script into an html box & press preview.


    HTML Code:
    <SCRIPT>
    var mydate=new Date()
    var theYear=mydate.getFullYear()
    var day=mydate.getDay()
    var month=mydate.getMonth()
    var daym=mydate.getDate()
    if (daym<10)
    daym="0"+daym
    var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
    var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
    document.write(dayarray[day]+", "+montharray[month]+" "+daym+", "+theYear)
    </SCRIPT>

  3. #3
    Stevo's Avatar
    Stevo is offline Sergeant Major
    Join Date
    Dec 2007
    Location
    San Francisco Bay Area
    Posts
    99

    Default Re: date format

    I'd like to use an auto date in a form field. Example: 1/25/08

    Any suggestions?

    Thanks.
    Steve

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49