|
|
Home /
Groups /
New York ColdFusion Users Group (NYCFUG)
quick SQL server question
Author: R.J.Siegel
I need to SELECT DISTINCT somedate as fld, count(somedate) as cnt from #tablename# but I can't get it to ignore the time-part of the date/times. I tried Dateparts, but got strange results. Is there some function that returns date-only? -- -- Bob/Jules Siegel Bob.Siegel@verizon.net -- -- ColdFusion / Web Databases / OurSubscribers.com ---
Author: Cook, Scott
Maybe convert(char(11),somedate,109) as fld Select the format you want and replace 109 with that I need to SELECT DISTINCT somedate as fld, count(somedate) as cnt from #tablename# but I can't get it to ignore the time-part of the date/times. I tried Dateparts, but got strange results. Is there some function that returns date-only? -- -- Bob/Jules Siegel Bob.Siegel@verizon.net -- -- ColdFusion / Web Databases / OurSubscribers.com --- ============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.csfb.com/legal_terms/disclaimer_external_email.shtml ==============================================================================
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||