Group By Day Name - And Time Range

Jul 5, 2007

Hi there,

With a DateStamp field

Im trying to group by Day Name

and also group it By Time ranges

i.e. Morning 00:00 to 11:59
Afternoon 12:00 to 17:59
Evening 18:00 to 23.59


I can do the group By Day Name ok
Like Below

Code:



SELECT COUNT(ISNULL(createdDate, 1)) AS DayCount, ISNULL(DATENAME(dw, createdDate), 'No Date Set') AS DayOftheWeek
FROM dbo.MyTable
GROUP BY ISNULL(DATENAME(dw, createdDate), 'No Date Set')




its just the grouping by time ranges im having trouble with..



Code:


M | T | W | Th | F | S | Su

Morning ||

Afternoon ||

Evening ||




Thanks for any help ..

View 5 Replies


ADVERTISEMENT

Query Info Between Time Range & Date Range

Aug 16, 2006

I am attempting to write a SQL query that retrieves info processed between two times (ie. 2:00 pm to 6:00 pm) during a date range (ie. 8/1/06 to 8/14/06)... I am new to SQL and am perplexed... I have referenced several texts, but have not found a solution. Even being pointed in the right direction would be greatly appreciated!!

View 6 Replies View Related

Group By A Range

Nov 9, 2005

Hey all,
I have a table of errors, where many of the records are the same error, with times very close to each other. I want to be able to group by the error number and time. But the time grouping is a special case, it should return the MAX(Time) within the records that are less than 1 minute apart. So if my records were:


Code:


ErrorTime
4561:23:23
4561:23:46
4602:14:34
4602:15:15
4562:22:23



My query should return:


Code:


ErrorMaxTime
4561:23:46
4602:15:15
4562:22:23



I've tried using GROUP BY ... HAVING ... with variations on MAX(Time) and DATEDIFF, but no luck. Any help is appreciated, thanks.

View 5 Replies View Related

To Group By Range Of Age

Jun 19, 2006

Hi guys,

I have these 3 fields :-
1. Name (varchar)
2. Sex (varchar)
3. DateBirth (datetime)

I want to display data which group by count for Male n Female and devide to 3 range group.
1. 18-21
2. 25-30
3. 35-40

the date different will be count by field datebirth, with year and getdate().
Can anyone help me on this. thx

Regards,
Shaffiq

View 12 Replies View Related

Time Range

Apr 21, 2008

Hi there

I am using SQL2005 and would like to check the whether the time is within the valid range for instance:

Data to check: 2:15AM

Range is between: 01:00AM till 06:59AM, 07:00AM till 02:00 PM

I can use the datepart for hh but that is not what I want. I want to have a full time: HH:MM cause sometimes if you do datepart by hour and if you apply into the above excample will be:

2 BETWEEN 1 AND 6 (this is ok)
2 BETWEEN 7 AND 2 (this is not ok)

Any idea?

View 3 Replies View Related

SQL Server 2012 :: Range Group Summary Of Particular Column

Jun 3, 2014

I have column which stores People count based on department, Now I want to keep them in the batch of 1000, If the running summary of (No of people) from departments reached 1000 then it should start sum(no of people) from 0 to 1000

Is there any running summary kind of function which can start sum record with in range of 0-1000

For Ex. My Data stored like this
Dept People Count
CSE 200
IT 250
EEE 312
ECE 214
MEC 337

Batch Grouping
Dept People Count BatchSum
CSE 200 200
IT 250 450
EEE 312 762
ECE 214 976
MEC 337 337 (Note here since its crossing 1000, its resetting and starting summary)

I implemented this with While Loop & if condition, But its very slow, is there any other way to achieve it in better way.

View 8 Replies View Related

Transact SQL :: Combining Dates To Group Into A Date Range?

Nov 17, 2015

My scenario is: a person has many events, all based on a date.  I need to aggregate the person to show min and max dates for a period, the period being defined as ending when there is not an event following the next date.

DECLARE @Events TABLE
(
PK_EventINTIDENTITY(1,1) PRIMARY KEY
,FK_UserINTNOT NULL
,EventDateDATENOT NULL
)
DECLARE @User TABLE

[Code] ....

I would expect the groups to look something like below:

Is this where a recursive CTE may be used?

View 6 Replies View Related

Query A Time Range?

Oct 5, 2007

Hello,I have a table that lists a number of available time slots for a party venue. I want a user to select a particular time slot and have the query show results for that time slot plus two time slots before and two time slots after the user's selection. If the user selects a time slot that is the first of the day, I still want that user to be shown 5 results including the one he selected. The same goes for the last time slot of the day. Can anyone help me with the SQL statement?
 Thank you very much in advance!
Mark

View 12 Replies View Related

Time Range Set By Query

May 7, 2014

I have a query to determine the time range like following

SET @StartDate = CAST (DATEDIFF(d, 0, DATEADD(d, 1 - day(getdate()), getdate()))as datetime)
SET @EndDate = GetDate()

What time range that query set ??

View 3 Replies View Related

Range On Time Field...

Sep 17, 2007

I want to create one complex query with Date time field,  my query is I want a grouping   between the time range
Â

EX:

Â

13/09/2007 1:00:00 PM    to  14/09/2007 4:00:00 AM    will be as Day1

14/09/2007 1:00:00 PM    to  15/09/2007 4:00:00 AM    Will be as Day2

''

''

''
This way the end date for the period will be 13/10/2007 4:00:00Â as Day 30

pavan

View 4 Replies View Related

Run Time Error: Out-of-range Datetime Value

Nov 26, 2003

Hi everyone, this is the exception:

System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value

Here's my code!

... 'datagrid code
cmdSelect.CommandText = "SELECT * FROM [Table] WHERE [Date and Time] > '" & Me.tbFromDate.Text & "' AND [Date and Time] < '" & Me.tbToDate.Text & "'"
...


Me.tbFromDate.Text and Me.tbFromDate.text look like this: 27/11/2003 1:11:43 PM

The SQL Query works fine - just that this code gives a runtime error.

Can someone help?? I'm guessing I have to do somekind of conversion!!

Andrew

View 1 Replies View Related

Retrieving 1st Record In Time Range Else

Jan 5, 2014

I have a date/time value (dd/MM/yyyy HH:mm:ss) stored in a field as part of each record in a dataset.

I would like to achieve the following via a single T-SQL query if possible (efficiency is not an issue as the dataset is small)

On query run;

Check if any records in the dataset are within 10 minutes + or - of the current system time (using the date/time value referenced above)

if none

Load the first record

View 6 Replies View Related

Reporting Services :: Chart - Group Values Depending On Date Range?

May 20, 2015

Currently I report our monthly fees broken down into 4 weeks per month by using 4 separate datasets with the following code

SELECT
SUM(Practice.ibvSalesByJob.JobBilledExVAT) AS Sum_JobBilledExVAT
FROM
Practice.ibvSalesByJob
INNER JOIN Practice.idvJobType

[Code] ....

The second dataset then has the date code changed to 

AND Practice.ibvSalesByJob.[Date] >= Cast(@Month AS char(2)) + '/08/' + Cast(@DateYear AS char(4)) + ' 00:00:01'
AND Practice.ibvSalesByJob.[Date] <= Cast(@Month AS char(2)) + '/16/' + Cast(@DateYear AS char(4)) + ' 00:00:00'

The third

AND Practice.ibvSalesByJob.[Date] >= Cast(@Month AS char(2)) + '/16/' + Cast(@DateYear AS char(4)) + ' 00:00:01'
AND Practice.ibvSalesByJob.[Date] <= Cast(@Month AS char(2)) + '/23/' + Cast(@DateYear AS char(4)) + ' 00:00:00'

The fourth

AND Practice.ibvSalesByJob.[Date] >= Cast(@Month AS char(2)) + '/23/' + Cast(@DateYear AS char(4)) + ' 00:00:01'

Now I was hoping so that I could report the above data in one chart and do an expression on the category and group the dates so I would just have one dataset like below but four separate columns saying Week 1, 2 3 and 4 and then the sum filtered in line.

SELECT
SUM(Practice.ibvSalesByJob.JobBilledExVAT) AS Sum_JobBilledExVAT
FROM
Practice.ibvSalesByJob
INNER JOIN Practice.idvJobType

[Code] ....

If I could somehow with SQL tie in all 4 separate datasets and display them as Week 1, 2, 3 and 4 underneath the dataset and selectable.An even simpler solution maybe just understanding how charts work, I can get it so I display the 4 separate weeks in the chart however I can't get the bottom line (Category Group) to display Week 1, 2, 3 and 4.

View 8 Replies View Related

Check Time Range In Store Procedure.

Oct 12, 2006

I have reservation database, suppose somebody reserved a resource on 10/12/2006 from 9:00am to 12pm. If anybody else want to reserve the same resource from 10am to 3pm. It will not let them reserver. I would like to check a range in store procedure. Is there has any function to check range in easy way?
Many thanks.

View 13 Replies View Related

Query Of Set Time Range Relative To Current Date

Dec 26, 2013

I come in to work 6.30am, and need to audit what happened from 5pm when I left to 6.30am this morning. I have used code to search 13.5 hours back from any given time:

SELECT * FROM TRANSACTION_HISTORY
WHERE TRANSACTION_HISTORY.ACTIVITY_DATE_TIME > (SELECT DATEADD(hour,-13.5,(SELECT MAX (TRANSACTION_HISTORY.ACTIVITY_DATE_TIME) FROM TRANSACTION_HISTORY)))

Problem is if I run query later, I lose time from the start, eg. If I run query at 7am, I only get results from 5.30pm onwards. Rather than change criteria every day, I wanted to able to search from 6.30am of the current day, back to 5.30pm of the previous day.

View 3 Replies View Related

Compare Today And Yesterday Time Range On Sales

Aug 23, 2014

I have to do a report for each hour compare yesterday each hour of sales amount their output is below, how to write a query.

desire output 08:00 am -23:00pm
shop today Time yesterday current Amt Yest Amt diff amount
001 13:00-14:00 13:00-14:00 $10000 $20000 -10000 (down)
002 14:00-15:00 14:00-15:00 $10000 $15000 500 (up)

Time as at HH:MM
Yesterday Total $20000
today Total $35000

View 2 Replies View Related

Query To Show Total By Shop On Time Range

Aug 28, 2014

How to edit this query to show the total by shop on time range ?

current result.(Time range from 9:00am-23:00pm)
Shop Time_slot cur Amt, yest Amt, Diff Amt, Sales Direction
Abc 10:59 $100 $50 +50 (+)
Abc 11:59 $100 $50 +150 (+)
Abc 12:59 $100 $50 +50 (+)
BBB 11:59 $100 $50 +150 (+)
BBB 12:59 $100 $50 +50 (+)
------------------------------------------------------------------

Desired Result .
Shop Time_slot cur Amt, yest Amt, Diff Amt, Sales Direction
Abc 10:59 $100 $50 +50 (+)
Abc 11:59 $100 $50 +150 (+)
Abc 12:59 $100 $50 +50 (+)
Total $300 $150 +$200 (+)

BBB 11:59 $10 $50 -40 (-)
BBB 12:59 $10 $50 -40 (-)
Total $20 $100 -80 (-)
-----------------------------------------------------------

select shop
,ltrim(str(datepart(hh,yourdatetimefield)))+':00 - '+ltrim(str(datepart(hh,yourdatetimefield)))+':59' as time_span
,sum(case
when datediff(dd,yourdatetimefield,getdate())=0

[Code] .....

View 1 Replies View Related

Analysis :: Parallel-period Equivalent For A Time Range?

Jan 27, 2009

Our client wants to report on their trade volume for last year as compared to the current quarter. For simplicity let's pretend they have a report where they have a two key measures:

[Trade Volume - Tons]
[Trade Volume - Tons MTD]
[Trade Volume - Tons]

is based on outlook - that is, for any period we are reporting on the trade volume will be reported as actuals that have been loaded up until the current period, and forecast for the current and future periods.

[Trade Volume - Tons MTD] is based only on actuals - that is for any period we are reporting on the trade volume will be reported as actuals that have been loaded up until and including the current period, and 0 for any future periods.

If Feb09 is our current period, and we are using quarter on the time dimension (where quarter 1=Jan09,Feb09,Mar09) and we have the following data:

Jan09 Trade Volume Actual: 100 Trade Volume Forecast: 150
Feb09 Trade Volume Actual: 50 Trade Volume Forecast: 200
March09 Trade Volume Actual: 75 Trade Volume Forecast: 225

Then

[Trade Volume - Tons]=100+200+225=525
[Trade Volume - Tons MTD]=100+50=150

This is a problem, because the comparison with their current results ([Trade Volume - Tons MTD]) with what they 'forecast' ([Trade Volume - Tons]) is not based on the same period of time - we are comparing the sum of two periods versus three periods.To solve this we changed the reporting period to be monthly granularity, and now select Jan09-Feb09 as our range (as opposed to having a quarter granularity and selecting Q1,2009 in the example above).

This works well and produces the expected results:

[Trade Volume - Tons]=100+200=350
[Trade Volume - Tons MTD]=100+50=150

However, this introduces a secondary problem: we are doing a prior year calculation on the Trade Volume also, so the users can compare how the actuals are comparing to the same period last year.To do this we use the following formula for the prior year calculation:

Prior Year Actuals=([Measures].[Trade Volume - Tons], ParallelPeriod([Time].[544 Hierarchy].[Period Year],1,[Time].[544 Hierarchy].currentmember))

The problem is as soon as we move from quarter granularity to (monthly granularity AND select more than one monthly period) the Prior Year Actuals calculation produces a an error "The MDX function CURRENTMEMBER failed because the coordinate for the 'Period Year' attribute contains a set".So, ParallelPeriod does not like it when currentmember is a range (Jan09,Feb09) rather than a single period (Jan09).

View 8 Replies View Related

T-SQL (SS2K8) :: Creating Missing Records In A Date / Time Range?

Nov 6, 2014

creating the missing records in a date/time range.

However, I need to return different groups for each span of records.

here's some data....

aaa1
aaa7
bbb2
bbb5
bbb6

The numbers are the hour of the day.

I need to return

aaa 0 0
aaa 1 1
aaa 2 0
aaa 3 0
...
bbb 0 0
bbb 1 0
bbb 2 1
...
and so on.

I've got a numbers table and I can left join with it but I just get nulls for the missing hours instead of having it as above.....I can't think of a way of repeating the groups for each of the 'missing' hours - other than creating a length insert statement to fill in the gaps....unless that is the only way of doing it.

View 6 Replies View Related

SQL Server 2012 :: Retrieving Minimum Value Over Rolling Time Range?

Apr 28, 2015

I need to provide a minimum value over a 12 hour time range of data. I'm struggling with performance issues due to the amount of data. Currently I log about 100 devices reporting once per minute into a table. Also about once per minute I need to pull the minimum value reported for each device in the last 12 hours. Currently I'm maintaining a separate table with entries for just the last 12 hours and just performing a Select Min(Temp) Where DeviceID=x, but it already holds about 700,000 records at any given time. The number of devices will increase substantially and this will no longer be viable.

Sample Table
ID DeviceID Temp InsertDate
1 10 55 04-28-2015 8:00 AM
2 65 74 04-28-2015 8:00 AM
3 44 23 04-28-2015 8:00 AM
4 10 87 04-28-2015 8:01 AM
5 65 65 04-28-2015 8:01 AM

View 3 Replies View Related

Reporting Services :: SSRS - Display Static Time Range On Y-axis?

Oct 6, 2015

displaying time interval on y -axis for an ssrs report.

the values are static... it should start from 00:00 - 23:59 with 00:30 interval....

interval of 30 mins...

I tried several functions that are available but didnt work.

View 6 Replies View Related

Analysis :: MDX - Aggregate Measure For Specific Time Range / Filtering And Print Only Current Month

Aug 6, 2015

At the following MDX code , I want to get the aggregate of measure only for  members that are also in the specified last time (like in examp 01/06/2015) . I tried existing and exists, but without any lack.

WITH MEMBER A AS
(b)+(C)
MEMBER [Measures].[Aggregate] AS
Aggregate(DAYTIME].[Month].&[2013-01-01T00:00:00]:[DAYTIME].[Month].&[2015-06-01T00:00:00],
([Measures].[D])

[Code] ....

View 13 Replies View Related

How To Group By Time Interval

Oct 1, 2007

Hello ,I have a stored procedure that group a series of event by day. My table Tevent has a timestamp column for every event.Tevent structure:idevent| event| DatetimeEvent
I just found out that I need to group the result by production shift of the day , therefore I have to group the result  for everyday from 8 AM until 2 AM the next day.Any idea of how to group by time interval?Thanks

View 4 Replies View Related

Group By Time Span

Feb 16, 2006

I have a database where user events are recorded quite frequently. I'd like to be able to get a count of the 'good' events that happen in each 5 second period. Unfortunately I don't know how to display and group by a time range.

Here is the query I would like to change:
SELECT count(*), clientTime
FROM dbo.V_COMBINED
WHERE (sessionId = '122b') AND (type = N'sys_goodaction') AND (paraName = 'value')
GROUP BY clientTime

It returns records like:
1 |2006-02-16 23:21:05.250
1 |2006-02-16 23:21:05.267
1 |2006-02-16 23:21:06.470

I'd like it to return records like:
5 |2006-02-16 23:21:06 - 23:21:10
3 |2006-02-16 23:21:11 - 23:21:15
4 |2006-02-16 23:21:16 - 23:21:20

Anyone know how I could do this? Is it even possible?

Thanks

View 2 Replies View Related

Group By Time Interval

Mar 5, 2008

Hello,

I'm trying to create a group by a set (but can change it later on) time interval.
What I mean by this is the following. I would like to group my data by 5 second intervals, and perhaps have a count for it as well - but that's not required.

For example I have the following data:

PRODUCT, DOOR, TIME_LOCATED
-------------------------------------
chips, 1, 3/5/2008 12:33:30 PM
harddisk, 1, 3/5/2008 12:33:30 PM
tea, 1, 3/5/2008 12:33:31 PM
software, 1, 3/5/2008 12:33:31 PM
chips, 1, 3/5/2008 12:33:32 PM
chips, 1, 3/5/2008 12:33:33 PM
chips, 2, 3/5/2008 12:33:34 PM
software, 1, 3/5/2008 12:33:40 PM
tea, 1, 3/5/2008 12:33:40 PM
software, 1, 3/5/2008 12:33:41 PM

Result in 5 second intervals (so group by values between 3/5/2008 12:33:30 and 3/5/2008 12:33:35)


Something like this?, or does have somebody a better idea?

PRODUCT, DOOR, TIME_LOCATED, COUNT
-------------------------------------------
harddisk, 1, 3/5/2008 12:33:30 PM 1
tea, 1, 3/5/2008 12:33:31 PM 1
software, 1, 3/5/2008 12:33:31 PM 1
chips, 1, 3/5/2008 12:33:33 PM 3
chips, 2, 3/5/2008 12:33:34 PM 1
software, 1, 3/5/2008 12:33:40 PM 2
tea, 1, 3/5/2008 12:33:40 PM 1

THANKS!

View 6 Replies View Related

Group By Time Interval.

Jul 20, 2005

I have a table(work_order) with time as varchar(5).The values in table looks like thiswork_order_id rtim1 08:152 08:453 10:134 14:56and so on...I want to count how many work orders for every half an hour.The result should look like thisHours Count8 108:30 159 349:30 03and so on....really 8 hours means the work_orders issued (rtim)between 8:00 AND 8:30.Any Help is Appreciated.Thankyou.Jaidev Paruchuri

View 4 Replies View Related

Group By Time Increments

Mar 24, 2008

Hello
I am trying to pull data from a table. I would like to group this dataset by a datetime field.
The result I want is for the records to be grouped together by their create time ( in this case using half hour increments.) All records created from the first half hour get grouped together, all records from the second half hour get grouped together etc. This dataset will contain data from a 24 hour time period (48 groups of data). What is the best way to accomplish? Do I need to use a cursor to accomplish?

Thanks

View 6 Replies View Related

Restore File Group At Certain Point Of Time

Aug 11, 1999

How could i restore a filegroup to a certain point of time (not to apply all
transaction log up to the latest one) ??

View 2 Replies View Related

Reporting Services :: Display Group Name Value Of Each Group In Column Header Outside The Group?

Sep 29, 2015

I have an SSRS 2012 table report with groups; each group is broken ie. one group for one page, and there are multiple groups in multiple pages.

'GroupName' column has multiple values - X,Y,Z,......

I need to group 'GroupName' with X,Y,Z,..... ie value X in page 1,value Y in page 2, value Z in page 3...

Now, I need to display another column (ABC) in this table report (outside the group column 'GroupName'); this outside column itself is another column header (not a group header) in the table (report) and it derives its name partly from the 'GroupName'  values:

Example:

Value X for GroupName in page 1 will mean, in page 1, column Name of ABC column must be ABC-X Value Y for GroupName in page 2 will mean, in page 2, column Name of ABC column must be ABC-Y Value Z for GroupName in page 3 will mean, in page 3, column Name of
ABC column must be ABC-Z

ie the column name of ABC (Clm ABC)  must be dynamic as per the GroupName values (X,Y,Z....)

Page1:

GroupName                 Clm ABC-X

X

Page2:

GroupName                 Clm ABC-Y

Y

Page3:

GroupName                 Clm ABC-Z

Z

I have been able to use First(ReportItems!GroupName.Value) in the Page Header to get GroupNames displayed in each page; I get X in page 1, Y in page 2, Z in page 3.....

However, when I use ReportItems (that refers to a group name) in the Report Body outside the group,

I get the following error:

Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope

I need to get the X, Y, Z ... in each page for the column ABC.

I have been able to use this - First(Fields!GroupName.Value); however, I get ABC-X, ABC-X, ABC-X in each of the pages for the ABC column, instead of ABC-X in page 1, ABC-Y in page 2, ABC-Z in page 3, ...

View 4 Replies View Related

Select Rows Where Value In A Range And Below A Range?

Nov 26, 2014

I'm running a pre-defined script which used to work fine on a file which was resupplied every month. below is the script used and the error message. looking at the error I assume that there is a rouge record within the file but have looked in Textpad and cannot find it.

UPDATE [matching].[dbo].[hot_nov] SET [AOV] = (CAST([Demand] AS DECIMAL)/CAST([Orders] AS INT)) WHERE [Demand] <> '';

UPDATE [matching].[dbo].[hot_nov] SET [POST2] = left([PostCode], PATINDEX('%[0-9]%', [PostCode] + '1') - 1) ;
UPDATE [matching].[dbo].[hot_nov] SET [POST4] = left([PostCode],LEN([PostCode])-4);
UPDATE [matching].[dbo].[hot_nov] SET [POST6] = left([PostCode],LEN([PostCode])-2);

error message

(1000 row(s) affected)
Msg 245, Level 16, State 1, Line 181
Conversion failed when converting the varchar value '2014-09-03 00:00:00' to data type int.

View 5 Replies View Related

SQL Server 2008 :: Query To Select Date Range From Two Tables With Same Date Range

Apr 6, 2015

I have 2 tables, one is table A which stores Resources Assign to work for a certain period. The structure is as below

Name StartDate EndDate
Tan 2015-04-01 08:30:00.000 2015-04-01 16:30:00.000
Max 2015-04-01 08:30:00.000 2015-04-01 16:30:00.000
Alan 2015-04-01 16:30:00.000 2015-04-02 00:30:00.000

The table B stores the item process time. The structure is as below

Item ProcessStartDate ProcessEndDate
V 2015-04-01 09:30:10.000 2015-04-01 09:34:45.000
Q 2015-04-01 10:39:01.000 2015-04-01 10:41:11.000
W 2015-04-01 11:44:00.000 2015-04-01 11:46:25.000
A 2015-04-01 16:40:10.000 2015-04-01 16:42:45.000
B 2015-04-01 16:43:01.000 2015-04-01 16:45:11.000
C 2015-04-01 16:47:00.000 2015-04-01 16:49:25.000

I need to select the item which process in 2015-04-01 16:40:00 and 2015-04-01 17:30:00. Beside that I need to know how many resource is assigned to process the item in that period of time. I only has the start date is 2015-04-01 16:40:00 and end date is 2015-04-01 17:30:00. How I can select the data from both tables. There is no need for JOIN, just seperate selections.

Another item process time is in 2015-04-01 10:00:00 and 2015-04-04 11:50:59.

The result expected is

Table A

Name StartDate EndDate
Alan 2015-04-01 16:30:00.000 2015-04-02 00:30:00.000

Table B

Item ProcessStartDate ProcessEndDate
A 2015-04-01 16:30:10.000 2015-04-01 16:32:45.000
B 2015-04-01 16:33:01.000 2015-04-01 16:35:11.000
C 2015-04-01 16:37:00.000 2015-04-02 16:39:25.000

Scenario 2 expected result

Table A

Name StartDate EndDate
Tan 2015-04-01 08:30:00.000 2015-04-01 16:30:00.000
Max 2015-04-01 08:30:00.000 2015-04-01 16:30:00.000

Table B

Item ProcessStartDate ProcessEndDate
Q 2015-04-01 10:39:01.000 2015-04-01 10:41:11.000
W 2015-04-01 11:44:00.000 2015-04-01 11:46:25.000

View 8 Replies View Related

How To Convert UTC Time (retrieved From SQL) To Local Time In Reporting Services Based On Time Zone

Aug 7, 2007



Hi all,

I have created a report in SSRS 2005 which is being viewed by users from different Time Zones.

I have a dataset which has a field of type datetime (UTC). Now I would like to display this Date according to the User Time Zone.

For example if the date is August 07, 2007 10:00 AM UTC,

then I would like to display it as August 07, 2007 03:30 PM IST if the user Time Zone is IST.


Similarly for other Time Zones it should display the time accordingly.

Is this possible in SSRS 2005?

Any pointers will be usefull...

Thanks in advance
sudheer racha.

View 5 Replies View Related

SELECT Where Value In A Range And Below A Range

Jul 29, 2013

I have a need to select rows where values in a column are within a range AND ALSO the first row that is highest (MAX) but just UNDER the range. For example:

NAME VAL
Jim 4
John 5
Tom 6
Julie 7
Rich 8
Rob 9

RANGE TO SELECT is 6-8 (inclusive)

Rows with a value in the range are returned (6, 7, & 8) as well as the row with a highest value that is JUST BELOW the range (5)

NAME VAL
John 5
Tom 6
Julie 7
Rich 8

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved