In sql server
 
 strSQLstringDelete = "DELETE FROM Winks WHERE [t_username] = '" & strWinkOwner 
& "' AND [WinkDate] 
 between dateadd(day,-30,getdate()) and getdate()
 
Note : In SQL SERVER getdate() return current date,also dateadd is a sql server 
function

Mike Belcher <[EMAIL PROTECTED]> wrote:
        strSQLstringDelete = "DELETE FROM Winks WHERE [t_username] = '" &
strWinkOwner & "' AND [WinkDate] Between DateAdd(""d"",-30,Date()) And
Date()"



Hi guys and gals. Above is a string to delete records between the date NOW
and 30 days before but what I am trying to do is delete any record that is
older than 30 DAYS. I am not great at the date stuff in SQL strings can
anyone tell me how I would modify the end of this string? Thank you.

Mike




---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
  
   To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


Send instant messages to your online friends http://uk.messenger.yahoo.com 

[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to