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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you date/ Time stamp a recordset in an access database

Status
Not open for further replies.

bellend

IS-IT--Management
Aug 31, 2004
5
0
0
GB
How do you date/ Time stamp a recordset in an access database and then access the last recordset entered to view on a page? Cheers in advance?
 
while inserting it do this:
<%
sql="insert into table(TheDate) values('"&now&"')"
%>

this will insert the date and time into TheDate field, u can always select the last record by:
<%
sql="select * from table order by TheDate desc"
rs.open sql,con
if not(rs.bof and rs.eof) then
response.write "Latest record -" &rs("TheDate")
end if
%>


Known is handfull, Unknown is worldfull
 
sql="insert into table(TheDate) values(#"&now&"#)"

actually for access you'll need to use #'s to delim the date

other than that vbkris got everything else nailed down i think

[thumbsup2]DreX
aKa - Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top