Announcement

Collapse
No announcement yet.

Print the "last modified" date in ASP?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Print the "last modified" date in ASP?

    I am trying to print the last modified date on a page on hs and it isn't working. I thought .asp supports SSI callouts, so I tried the following, which I know works in my .shtml pages of my website:

    <pre class="ip-ubbcode-code-pre"> Last Modified:
    &lt;!--#config timefmt="%B %d, %Y"--&gt;
    &lt;!--#echo var="LAST_MODIFIED"--&gt; </pre>

    And they don't get executed. Is HS's ASP setup only to handle the #include callouts? If so, is there any other way to do this?

    ---
    Todd
    My HomeSeer - My Website

    #2
    I use this on my redirect page. Itz a little bit of javascript. Maybe it will help.........JG

    &lt;!-- This shows the user the last date this page was modified --&gt;
    &lt;BR&gt;&lt;TT&gt;&lt;CENTER&gt;&lt;FONT FACE=ARIAL&gt;&lt;FONT COLOR="#808080"&gt;&lt;SCRIPT LANGUAGE="JAVASCRIPT"&gt;&lt;!--
    var months = new Array("January","February","March","April","May","June","Jul y","August","September","October","November","December");
    var days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Fr iday","Saturday");
    var lmod = new Date(document.lastModified); var H = lmod.getHours(document.lastModified); var MI = lmod.getMinutes(document.lastModified); var S = lmod.getSeconds(document.lastModified); var Da = lmod.getDay(document.lastModified); var MO = lmod.getMonth(document.lastModified); var D = lmod.getDate(document.lastModified); var Y = lmod.getFullYear(document.lastModified); var AM =" AM";
    if(H&gt;12){H=H-12;AM=" PM";}if(H&lt;10){H="0"+H;}if(MI&lt;10){MI="0"+MI;}if(S&lt;10 ){S="0"+S;}
    var T = days[Da]+ ", "+months[MO]+" "+D+", "+Y+" At "+H+":"+MI+":"+S+ AM;
    document.writeln("This page was last updated on "+T+".");
    //--&gt;&lt;/SCRIPT&gt;&lt;/FONT&gt;&lt;/CENTER&gt;&lt;/TT&gt;
    HS2PRO - Ocelot, SecuIR, Secu16, Attendence Management Alarm Interface, X-10, LCD Studio VFD Display, 3 Apexis IP Cams, Custom Software Interfaces, GMQ Geiger Graphing
    HS3PRO - Testing

    Comment


      #3
      I tried that, and it works, but it just uses the current date, like it can get the date, just not the last modified date of that file. Thanks for trying though. I just might say screw this and just put it in there manually (fyi, this is only going to be on "my home autmation setup" page, which I won't be updating that much anyway.

      ---
      Todd
      My HomeSeer - My Website

      Comment


        #4
        You'd have to embed the filename inside the file, I think, unless there's a way to find it out, but...

        <pre class="ip-ubbcode-code-pre">
        &lt;%
        dim fso, f
        set fso = CreateObject("Scripting.FileSystemObject")
        set f = fso.GetFile(hs.GetAppPath & "\html\testfile.asp")
        response.send f.DateLastModified
        %&gt;
        </pre>

        It seems to work for me, but I don't know if that's what you intended.

        Nucleus Home Automation
        News, support, and updates for Rover, Network Monitor, TimeIcons, and more

        Comment


          #5
          Yep, it works. Thanks a bunch. [img]/infopop/emoticons/icon_biggrin.gif[/img]

          ---
          Todd
          My HomeSeer - My Website

          Comment

          Working...
          X