Results 1 to 2 of 2

Thread: Timestamp Date/Time ASP(Access database)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2004
    Location
    Earth 4 now.
    Posts
    27

    Red face 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:
    1. <% response.write(now())%>
    Last edited by ShotokanTuning; Jun 22nd, 2004 at 09:19 AM.

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    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

    BOFH Now, BOFH Past, Information on duplicates

    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
  •  



Click Here to Expand Forum to Full Width