Viewing 15 posts - 886 through 900 (of 1,243 total)
Lynn Pettis (9/25/2014)
Sean Lange (9/25/2014)
September 25, 2014 at 2:45 pm
Hi Bill,
thanks for the Series. I've struggling with an odd problem with comparing the results in Excel. When I copy the filtered results across and apply the Auto-Average...
September 25, 2014 at 5:56 am
If you change the fixed date to getdate() or the time you ran the report it will round the hour to the start of that hour for the start date...
September 24, 2014 at 3:51 am
StartDate = dateadd(hh, datediff(hh, 0, '2014-09-24 08:30:00.000') - 1, 0)
EndDate = dateadd(hh, datediff(hh, 0, '2014-09-24 08:30:00.000'), 0)
Does that do what you want?
September 24, 2014 at 3:22 am
Do you mean how do you show a rounded time in the end date column?
September 24, 2014 at 3:12 am
I looked at the question and thought that was a lot to do for first thing in the morning. Then I looked at it again and saw what the...
September 24, 2014 at 1:11 am
What Sean says.
It'll be much easier to suggest which to use if you can give us some sample data and tell us what you want to do with it.
September 23, 2014 at 7:32 am
That really depends on what you're trying to achieve. Both could be correct (or incorrect).
September 23, 2014 at 7:23 am
girl_bj (9/23/2014)
I get this error:The data types time and datetime are incompatible in the greater than or equal to operator.
Which answer are you getting the error on?
September 23, 2014 at 2:53 am
SELECT
SampleDate,
CAST(SampleDate AS time),
SampleID
FROM
DateTimeQuery
WHERE
CAST(SampleDate AS time) >= dateadd(hh, datediff(hh, 0, getdate()) - 1, 0)
AND
CAST(SampleDate AS time) < dateadd(hh, datediff(hh, 0, getdate()), 0)
That will return the data...
September 23, 2014 at 2:43 am
Viewing 15 posts - 886 through 900 (of 1,243 total)