Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 29th, 2004, 09:06 AM
Registered User
 
Join Date: Apr 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to retrieve data 48 hours old

Hi i wish to retrieve from my database table, records that are 48 hours old. I've a date field in the database table. How do i do it. Pls help me.

Thank u very much
 
Old April 29th, 2004, 09:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This should work for a SQL Server database:
Code:
SELECT * FROM YourTable
WHERE DateField > (GetDate() - 2)
Or if you have an Access database then this should work:
Code:
SELECT * FROM YourTable
WHERE DateField > (Date() - 2)
I hope that helps.

Regards
Owain Williams





Similar Threads
Thread Thread Starter Forum Replies Last Post
retrieve data dynamically pitiporn Classic ASP Basics 3 May 28th, 2006 11:21 PM
cannot retrieve data because of redirecting artuc General .NET 0 December 18th, 2004 02:52 AM
Retrieve data Snib C++ Programming 2 November 6th, 2004 11:09 AM
trying to retrieve data from another page Calibus Classic ASP Databases 3 July 17th, 2004 11:51 PM
data retrieve from three tables mateenmohd SQL Server 2000 2 October 7th, 2003 04:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.