Dec 1, 2007 #1 agmac Programmer Joined Nov 16, 2007 Messages 4 Location US Need help with an sql query that returns only those records in a table that are 45 days old. The table does have a date/time column (called re_time) that used the now() function to place the date/time into it. Agmac
Need help with an sql query that returns only those records in a table that are 45 days old. The table does have a date/time column (called re_time) that used the now() function to place the date/time into it. Agmac
Dec 1, 2007 Thread starter #2 agmac Programmer Joined Nov 16, 2007 Messages 4 Location US I figured it out... WHERE mycolumn > DATEADD('d', -45, now()) Works using ASP and Access DB for those out there that might need to know this.. Agmac Upvote 0 Downvote
I figured it out... WHERE mycolumn > DATEADD('d', -45, now()) Works using ASP and Access DB for those out there that might need to know this.. Agmac
Dec 2, 2007 #3 r937 Technical User Joined Jun 30, 2002 Messages 8,847 Location CA doesn't work in ANSI SQL, though ;-) r937.com | rudy.ca Upvote 0 Downvote
Dec 2, 2007 #4 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR A simpler way in JetSQL: WHERE mycolumn > Date()-45 Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote