Showing posts with label range. Show all posts
Showing posts with label range. Show all posts

Sunday, March 25, 2012

Adding a day to a date.

Pls help if you can. I have two dates, date1 and date2.
Basically I want to set date2 = date1 + 1 day for a range of dates
that I can select out.

Is there any way to do this?"Chachu" <cpatel1@.gmail.com> wrote in message
news:d7c4c47b.0410050757.6d4bc3a1@.posting.google.c om...
> Pls help if you can. I have two dates, date1 and date2.
> Basically I want to set date2 = date1 + 1 day for a range of dates
> that I can select out.
> Is there any way to do this?

See DATEADD in Books Online:

update dbo.MyTable
set date2 = dateadd(dd, 1, date1)
where ...

Simon

Tuesday, March 20, 2012

AddcurrentRange ?

Report.ParameterFields(4).AddCurrentRange "000", "999", 3
In this line of code, what does number 3 stands for ? 000 is start and 999 is end range I presume, but number 3 is a mistery 2 me.According to info I found :

"Use this bitwise value to indicate whether the upper and/or lower bound of the range should be included".

I'm not sure which value indicates what, though.

Hope this helps.|||http://support.businessobjects.com/library/kbase/articles/c2007345.asp :

'crRangeNotIncludeUpperLowerBound 0
'crRangeIncludeLowerBound 2
'crRangeIncludeUpperBound 1
'crRangeNoLowerBound 8
'crRangeNoUpperBound 4

I would guess the value 3 probably means include both upper and lower?

Friday, February 24, 2012

add date range filter - brand newbie to reporting services

I've used report wizard to create a report - one of the fields in the report is a date field. I simply want a From Date: and To Date: filter which enables a user to select a range of dates to filter results. I know how to do this in .Net, but am not sure how to achieve this in RS. If anyone could shed some light, or point me to an thread which describes a similar process, I'd appreciate it.

thx

If you are using Visual Studio then for the data source your query should be just like a stored procedure with a parm...

Select col1, col2

From tbl1

Where col1 = @.parm1

When you open the report in Report Manager it should have a space for you to type in the value.

Now if you are using Report Builder then I don't know as I'm here looking for that answer myself.

|||

If you are using the report builder you just put the following the filter column for the date field.

Between @.SDate and @.EDate

Then go to your report parameters (right click on the upper left corner of the layout)

Click on each parameter SDate and EDate and set the type to Date/Time. It defaults as a string.

Hope this helps.

Jen