|
-
Jun 22nd, 2004, 09:06 AM
#1
Thread Starter
Junior Member
Timestamp Date/Time ASP(Access database)
Hi I'm writing a ASP application which uses a Access database.
I want to make a timestamp everytime a table was updated.
For that I need the current date and the current time to be saved to the databse.
Looking at the Access database default options, I think "General Date" (dd-m-yy hh:mm:ss) is the best option.
- First how do I get the current time, how do I get it in the right format and how do I save it to the database. I thought about Now() or <% =Now %> but how do I use that, in this case.
- Then when the date is in the database how do I show it in a webpage. Can I just write the Table field as if it was ordinairy text?
Thanks alot.
<% response.write(now())%>
VB Code:
<% response.write(now())%>
Last edited by ShotokanTuning; Jun 22nd, 2004 at 09:19 AM.
-
Jun 22nd, 2004, 09:50 AM
#2
Tos save per table, you'd need a table listing the tables you've updated. Then execute an Update sql statement with 'Now' function.
Forget formatting it, just get the Now function into the table. Formatting you can do as you send it to the page.
As to records updated in tables, you can always store LastUpdated as a field and put the Now date into that.
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|