;)

--- Mike Belcher
<[EMAIL PROTECTED]>
wrote:

> Just wanted to thank you all it works. Karen I put
> it just like this
> strSQLstringDelete = "DELETE FROM Winks WHERE
> [t_username] = '" &
> strWinkOwner & "' AND [WinkDate] < (GetDate()-30)"
>                     
> 
> It worked thanks.
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Karen Kungowski
> Sent: Thursday, June 09, 2005 12:04 PM
> To: [email protected]
> Subject: Re: [AspNetAnyQuestionIsOk] RE:
> DateAdd(""d"",-30,Date()) And
> Date() - ooops Server TYPE
> 
> You can tweak this to your needs. Just subtracting
> days from GetDate() works in SQL Server just like it
> works in Access Date()-30 sort of thing.
> 
> SELECT DateCreated FROM EDI_BATCHES
> WHERE DateCreated < (GetDate()-30)
> ORDER BY DateCreated DESC
> 
> --- Mike Belcher
> <[EMAIL PROTECTED]>
> wrote:
> 
> > I forgot to mention that the string is from an
> > access project and works
> > there but the date part doesn't seem to work with
> > SQL server. I am using SQL
> > server on this current project and need to figure
> > out how to delete messages
> > older than 30 days....... Thank you.......
> > 
> > -----Original Message-----
> > From: Mike Belcher
> >
>
[mailto:[EMAIL PROTECTED]
> > 
> > Sent: Wednesday, June 08, 2005 6:46 PM
> > To: '[email protected]'
> > Subject: DateAdd(""d"",-30,Date()) And Date()
> > 
> >         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
> > 
> >
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
> > 
> >    
> > [EMAIL PROTECTED]
> > 
> >  
> > 
> > 
> > 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
> 
>    
> [EMAIL PROTECTED]
> 
>  
> 
> 
> 



 
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