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!

HELP!! Read and compare timestamp value

Status
Not open for further replies.

RemoteSilicon

Programmer
Feb 13, 2001
45
0
0
GB
Hello,

A project I've been working on, there is a requirement to display the last modified value of records that are less than 5 days old. The project is in .Net + SQL Server 2000

In order to do that, I have added a timestamp field and now need to:

1. Display the timestamp value in human readable format
2. Compare the timestamp field and retrieve only those records that are less than 5 days old

Please help!!!
 
A timestamp isn't anything to do with a datetime. It's sort of a transaction count.
On it's own there's no way of finding from the timestamp when the record was chaged.

You could put a trigger on the table to update a lastupdatted datetime field when a record is inserted/updated.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top