[thelist] SQL Chaos!!
Jason Handby
jasonh at pavilion.co.uk
Tue Jan 28 12:10:01 CST 2003
> How about using DateValue(DateCreated)? This will strip the time portion
> of DateCreated.
If you're using MS SQL Server you can take advantage of the fact that
datetime values are stored as floats, with the fractional part representing
the time of day. So you can discard the time part by using CAST if you're so
inclined:
...GROUP BY CAST(DateCreated AS INT)
(Of course this doesn't give you a nicely-formatted date in your resulting
rowset, but I thought it was worth mentioning.)
Jason
More information about the thelist
mailing list