Show" Last view... Day - Month - Date - Year on page.

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Show" Last view... Day - Month - Date - Year on page.

    Hello All;

    I have just added in a JavaScript function that show that
    Day - Month - Day - Year
    On my page. This is going for a look of


    Last reviewed Saturday, August,9, 2003

    This code is done in JavaScript....
    Is there a way to do it in "ASP" Instead of JavaScript?????

    This is the code. For the function.
    Any comments are gladly welcomed...
    -------------------------
    <SCRIPT LANGUAGE="JavaScript1.2">

    <!-- Begin
    var myDays=
    ["Sunday","Monday","Tuesday","Wednesday","Thursday" ,"Friday","Saturday","Sun
    day"]

    var months=new Array(13);
    months[1]="January";
    months[2]="February";
    months[3]="March";
    months[4]="April";
    months[5]="May";
    months[6]="June";
    months[7]="July";
    months[8]="August";
    months[9]="September";
    months[10]="October";
    months[11]="November";
    months[12]="December";
    today=new Date()
    thisDay=today.getDay()
    thisDay=myDays[thisDay]
    var time=new Date();
    var lmonth=months[time.getMonth() + 1];
    var date=time.getDate();
    var year=time.getYear();
    if (year < 2000)
    year = year + 1900;
    document.write(""+ thisDay +", " + lmonth + ",");
    document.write(""+ date + ", " + year + "");
    // End -->
    </SCRIPT>
    --------------------------

    Thank you All....

    Wayne


    Wayne & Carr Guest

  2. Similar Questions and Discussions

    1. group by month/year
      I have a table that has a column titled ArticleDate. I would like to group an output based only on the month and year. For instance, a link for...
    2. SQL: can a date ONLY contain month/year info?
      When using a SQL datetime field, is there a way to store ONLY the month and year? I have a situation where I need to store both month/year and...
    3. 1210: Date could not be converted to month/day/year format
      Hi, I got this error when downloading a table by "unload" order : 1210: Date could not be converted to month/day/year format It seems that a...
    4. Get Year, Month and the Day
      It works fine but i read the date from a database and i need the year, month and day of this date not the system date. If you know how to seperate...
    5. Sort - Month then day without year
      How's about "Sort" Month / Day without year in birthday date field? Daniel R. Sloan
  3. #2

    Default Re: Show" Last view... Day - Month - Date - Year on page.

    Hi there,

    Look up DatePart(), MonthName(), WeekdayName(), etc.

    Regards,

    Alan

    "Wayne & Carr" <spam@spam.net> wrote in message
    news:e7FjMhuXDHA.736@TK2MSFTNGP09.phx.gbl...
    > Hello All;
    >
    > I have just added in a JavaScript function that show that
    > Day - Month - Day - Year
    > On my page. This is going for a look of
    >
    >
    > Last reviewed Saturday, August,9, 2003
    >
    > This code is done in JavaScript....
    > Is there a way to do it in "ASP" Instead of JavaScript?????
    >
    > This is the code. For the function.
    > Any comments are gladly welcomed...
    > -------------------------
    > <SCRIPT LANGUAGE="JavaScript1.2">
    >
    > <!-- Begin
    > var myDays=
    >
    ["Sunday","Monday","Tuesday","Wednesday","Thursday" ,"Friday","Saturday","Sun
    > day"]
    >
    > var months=new Array(13);
    > months[1]="January";
    > months[2]="February";
    > months[3]="March";
    > months[4]="April";
    > months[5]="May";
    > months[6]="June";
    > months[7]="July";
    > months[8]="August";
    > months[9]="September";
    > months[10]="October";
    > months[11]="November";
    > months[12]="December";
    > today=new Date()
    > thisDay=today.getDay()
    > thisDay=myDays[thisDay]
    > var time=new Date();
    > var lmonth=months[time.getMonth() + 1];
    > var date=time.getDate();
    > var year=time.getYear();
    > if (year < 2000)
    > year = year + 1900;
    > document.write(""+ thisDay +", " + lmonth + ",");
    > document.write(""+ date + ", " + year + "");
    > // End -->
    > </SCRIPT>
    > --------------------------
    >
    > Thank you All....
    >
    > Wayne
    >
    >

    Alan Guest

  4. #3

    Default Re: Show" Last view... Day - Month - Date - Year on page.

    Hello "Alan";

    Thank you for the information, I found some really great source sites and
    information on use.
    Or the Functions.

    But while looking at one of the sites. I realized that what I am after is
    not a time stamp to put on a page.
    But better yet a "review Data stamp"
    Kind of like this.

    You go to a site and you click on a link that states: be the first to
    review this information.
    And then after you write up your information on the site, it then gives a
    "Review Date Stamp"
    So that other that visit that page, will see that it was last reviewed on:
    Day/Month/Date/Year

    So I think that I am going to work on making a Review page up, so that
    people can
    Submit there reviews on the site.... That sounds like a good plain..

    Take Care Alan;

    Wayne


    Wayne & Carr Guest

Posting Permissions

  • You may not post new threads
  • You may 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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139