Skip to main content
Participating Frequently
April 17, 2009
Question

display last modified date for database

  • April 17, 2009
  • 2 replies
  • 769 views

Hello,

I'm trying to display a the last modified date for a dynamic webpage that pull info from a MS Access db. I searched the forums but couldn't find a real solution. Can anyone tell me what I'm doing wrong?

<cfdirectory directory="http://makeupurl.epds.com/databases/CustomerService/cs_data.mdb" name="GetDate" action="list" filter="*.mdb">

<cfoutput> #GetDate.dateLastModified#</cfoutput>

thanks

    This topic has been closed for replies.

    2 replies

    Inspiring
    April 18, 2009

    I get the desired result with the following code. A little different in that I am checking for updates for any files in the directory. Perhaps you can do the same but only have your .mdb in the target directory. Hope this helps.

    directory="...your directory path here...."
    name="mydirectory"
    sort="size ASC, name DESC, datelastmodified">

    <cfoutput query="mydirectory">
    Updated #dateformat(mydirectory.dateLastModified, "mmmm d, YYYY")# at #Timeformat(mydirectory.dateLastModified, "hh:mm tt")# Eastern Time.
    </cfoutput>

    eynar23Author
    Participating Frequently
    April 20, 2009

    thanks ghouser and Dan. Your advice helped out.

    Inspiring
    April 17, 2009

    Since you didn't specify a row number here ==> <cfoutput> #GetDate.dateLastModified#</cfoutput> <==, you will either get the 1st or last row of that query.  I forget which.

    Also, you are applying the cfdirectory tag to a file, not a directory.