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

Dated record was last updated

Status
Not open for further replies.

david7777777777

Programmer
Joined
Sep 26, 2001
Messages
417
Location
US
How do I retreive the date that a record was last updated? I'd like to display this datestamp in a field in the table for that same record. It's SQL 2000 on Windows 2000 Server.
Thanks.
 

Unless you have included a datetime column on a record and updated it, you cannot retrieve the last update datetime in SQL Server. It is not recorded. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
How about this: I could have the current system date thrown into a datetime field in that table for that record when the user clicked the [Save Record] button. How do you get the system date, what script command do you have to use?
Thank you.
 

Use the getdate() or CURRENT_TIMESTAMP functions.

Update Table Set Col=getdate() Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top