Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

acessing a db modified date

Status
Not open for further replies.

apparition

Technical User
Aug 8, 2001
34
US
I have a couple of asp pages that pull certain records from an access database. I need to put a dynamic "updated" date on the page so that people know when the information was last updated.

Is there a way to access the modified date for the database? Or maybe some way in Access to have a date automatically updated everytime the database is changed?
 
OK, I figured it out.

<%

Dim objFSO
Dim fFile

Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set fFile = objFSO.GetFile(&quot;D:\somedir\somefile.ext&quot;)
Response.Write FormatDateTime(fFile.DateLastModified, 2)

%>
 
or, depending on the nature of your data, you could add a field to each record called Date_Modified, and take the most recent date from the database. That would eliminate the need to use the file system object in addition to querying the database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top