Here's a better explination of timestamp:
http://www.basenow.com/help/Data_types_in_Microsoft_SQL_Server.asp
timestamp 

Is used to indicate the sequence of SQL Server activity on a row,
represented as an increasing number in a binary format. As a row is
modified in a table, the timestamp is updated with the current database
timestamp value obtained from the @@DBTS function. timestamp data is not
related to the date and time of an insert or change to data. To
automatically record times that data modifications take place in a
table, use either a datetime or smalldatetime data type to record the
events and triggers.

Note  In SQL Server, rowversion is a synonym for timestamp



 

-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 01, 2007 11:21 AM
To: SQL
Subject: MS SQL Server: grouping date-time values

I have a table with records containing a time-stamp field.

I want to query this data grouped by various time ranges such as hour,
day, week and month. I want to count and sum data in other fields based
on these time ranges.  Why syntax am I looking for to parse date time
values so that I can group them by various units?





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2989
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to