Thursday, February 9, 2012

Adding a time stamp to the records

I have a shopping cart that will get full from time to time because
customers click out of the site before they confirm their purchase,
therefore leaving a full cart behind. I'd like to have a timestamp on
this table, so that I can delete anything that I find is more than a day
old.

How can I do this?

Thanks,

Bill

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Hi

You could use a not null datetime field and specify the default as
getdate(). This will insert the current date/time when the record is
created. and you will not have to specify a value. You can then run a
scheduled task (job) that checks for entries older than a given date.

John

"Bill" <BillZimmerman@.gospellight.com> wrote in message
news:3f4fe28e$0$62083$75868355@.news.frii.net...
> I have a shopping cart that will get full from time to time because
> customers click out of the site before they confirm their purchase,
> therefore leaving a full cart behind. I'd like to have a timestamp on
> this table, so that I can delete anything that I find is more than a day
> old.
> How can I do this?
> Thanks,
> Bill
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

No comments:

Post a Comment