Paul Nielsen
pauln at sqlserverbible.com
Tue Mar 18 13:04:24 CDT 2008
Cast() or convert() I'd recommend converting to the date only as the data goes in. -Paul -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, March 18, 2008 11:50 AM To: 'Discussion concerning MS SQL Server' Subject: [dba-SQLServer] SQL Server date functions I am pulling a TopN kind of thing and marking those records with GetDate() which places a date and time in a date field. Now I want to pull all the records with today's date. The first problem is that GetDate() pulls the date and time. The second problem is what to place in the filter. I am not finding a date() kind of thing like you have with Access. How do I pull all records with today's date in a date field (that also contains the time)? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com __________ NOD32 2957 (20080318) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com