What do you mean when you say you can't get it to work? Does it give an error? Does it not give expected results? Does it slack off and sleep at its desk?
I'm going to guess it's lack of results. Try looking at only the date portion if you're not concerned with the time. Select * from database where DATEDIFF(day, Requested, '2005-03-25') = 0 Ray at work > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of > Mills, Andy R. (Regency) > Sent: Wednesday, September 28, 2005 1:39 PM > To: '[email protected]' > Subject: [ASP] SQL DateTime Select Statement > > Hello Guys: > > I cannot get this SQL Statement to work. > > select * from database where Requested = CAST('2005-03-25' AS > DateTime) > > In the database: Requested = 2005-03-25 15:51:47.693 > > What am I doing wrong here? > > > Thanks > > Andy Mills > > > > [Non-text portions of this message have been removed] > > > > ------------------------ Yahoo! Groups Sponsor > --------------------~--> Most low income households are not > online. Help bridge the digital divide today! > http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/17folB/TM > -------------------------------------------------------------- > ------~-> > > -------------------------------------------------------------- > ------- > Home : http://groups.yahoo.com/group/active-server-pages > --------------------------------------------------------------------- > Post : [email protected] > Subscribe : [EMAIL PROTECTED] > Unsubscribe: [EMAIL PROTECTED] > --------------------------------------------------------------------- > Yahoo! Groups Links > > > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/17folB/TM --------------------------------------------------------------------~-> --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [email protected] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> 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/
