.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Date as a Search Parameter

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :ASP.Net


I am trying to get gridview populated on the basis of Date as a search parameter.

Date Textbox is taking date as MM-dd-yyyy.

Date format in table is dd/MM/yyyy HH:mm:ss.

The problem is that when I give date for example 30-04-2010, the data is not populating to gridview as the date in the table is 30/04/2010 12:00:00 .

Actually I want to know query.

Any idea would be helpful.

View Complete Post

More Related Resource Links

SharePoint Search returns wrong date

Hi i am running a Sharepoint 2010 enterprise search indexing a file folder structure with emails(.eml) and attachments(.doc(x), pdf, xls(x), ...). The search results shows a date like first full index time or something like that, but not the date of file creation or any other attributes of the file. My questions: - what may be the reason of the wrong date? - is there a possibility use another attribute for displaying that is more relevante? Please help Kind regards Werner Durrer    

Using date as a parameter

Environment: 2008 SSRS, 2008 visual studio We run our reports in two modes. User selects a report from a menu on a web page, the report displays and waits for them to enter some filter parameters. Or, some pages have a print button where the report is run with all the required parameter values pulled from the the data state of the page with the button. The same RDL is used in both instances. One particular report has dates as required parameters. When the report is run prompting the user for parameters it works great. When run at the press of a button is when we have problems. The pertinent sections of the RDL look like this: In the parameter section the parameter is defined like:     <ReportParameter Name="FromChangeDate">       <DataType>DateTime</DataType>       <Prompt>From Change Date</Prompt>     </ReportParameter> In the query section the parmeter is defined:           <QueryParameter Name="@FromChangeDate">             <Value>=Parameters!FromChangeDate.Value</Value>           </QueryParameter> The corresponding parameter in the stored procedure is defined: @FromChangeDa

Search based on creation date

Hello All, I would like to ask which managed property I should use for searching based on creation date. It seems I can't find a managed property to do this. I created my own managed property with the right crawled properties, which works. But I think this should be something out of the box.  Please help, thank you  Anna

Date Picker Parameter

hi guys... I can't get the date picker for ssrs 08 reports to work. My underlying columns is a datetime type and as far as I know that should do it. It just shows the dates as normal entries even though I changed the Data type from text to date/time in the report parameters properties. Any idea much appricated? Thx

Date format in Search Core Result web part

Hi, I have two Site Columns PublishedDate and GlobalTitle. They have datetime and string type. These site columns are added to the Custom List. I need to show these columns in Search Core Result web part when item is searched. Because of this reason I created them as Site columns and Mapped with crawl property in SSP. After doing full crawl I can access both site columns in Search core Result. GlobalTitle is displayed properly but problem is with PublishedDate. It shows System.DateTime[] only. Can any one help me to show this in any of the date format but not like System.DateTime[]. Many Thanks in advance Chirantan

Unble to pass date parameter to "Go to Report " ?


Hi ,

I have Report A need to go from Report A to Report B passing multivalued parameter and date parameter as well , I do not have any problem passing  Multivalued parameter but cant pass date parameter from Report A and Report B .

Report A : Date parameter properties

name : date

Data Type : Date/Time

Default value =Today()

Report B : Date parameter properties

name : date

Data Type : Date/Time

Default value =Today()

Go to Report action ,Expression used to pass date parameter  from Report A to Report B


Unable to pass appropriate date parameter if changed from default value from ReportA to ReportB .

Assistance would highly be appreciated !!

Thanks .

Rajkumar Yelugu

search on a date


Goodday , i,m looking for a query which i can look for a date .

For example I have the below code to search a ClientName in the InvoiceTable . How can i write this in the same way  so as there is a textbox on my form where i can put in the date i want to search on.  thanks   rob

WHERE (InvoiceTable.ClientName LIKE '%' + @ClientName +'%' )


remote execution of ssis package using wcf doesn't like date parameter


I have a ssis package remotely executed by a C# windows application that runs ok in context of SSIS installed on the desktop; I created a wcf windows service that the C# application executes, creates a copy of the package with the date in the variable, but errors on the first SQL task component that requires the date. The copy executes using the SSIS utility. What is possibly the issue with wcf and the date type in the SSIS package? Here is the error:

OnError,SRVR2BLADEA3,MIC\1347259,Clear CII ImportDate,{AB3CF5BA-C114-40F6-9ECB-4C7620D97829},{8B1C10CB-580F-4BFE-BC7D-0B97C181E307},9/27/2010 3:29:56 PM,9/27/2010 3:29:56 PM,-1073548784,0x,Executing the query "" failed with the following error: "The type initializer for '<Module>' threw an exception.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Here is the code:

case @"E:\SSIS Packages\CIISCImport.dtsx":

//string dtValue = (prms[iPrms - 1].Split('=').GetValue(1).ToString()) + " 12:00";

vars["User::ImportDate"].Value = DateTim

Advanced Search in date field in sharepoint 2010



I have a question about advanced search that field a Date,

When searching the date field the sharepoint can not find any document and writes:

"No results found appropriate."

When going to standart search the sharepoint find documents also in date search .

in central administration in metadata properties- the  Data of the field is set.

What could be the problem?

How to add date picker in Sharepoint 2010 Advance search

How to add date picker in Sharepoint 2010 Advance search

Restricting Date Parameter Values


I have a daily revenue report (with 1 date parameter) that runs daily via report subscription.  Is there a way to restrict the date parameter so it can only select from 2009/1/1 up to Yesterday.  Our daily ETL process will process yesterday's data around 6:00 am, if the user picks a wrong date then the report will be incomplete.  I use =DateAdd("d",-1,Today()) for my default date parameter.

Is there a way to come up an explanation or a message  that “processing has not completed” or “data not available” if the user try to pull a report with wrong date?


Thanks, Michael Mei

SSIS - Passing a date parameter to a SQL Query question again....


I need to pass a date string to my sqlcommand inside of my "datareader source".  I read some of the questions about setting expression variables but I can't seem to figure out how to do it.  I pasted the query below.  The table name contains a date in it so I need to pass that date as a string into my sqlcommand at runtime.  Do I create a variable with the entire SQL command in it or can I just create a single variable that holds the date and just reference that in my datasource reader sqlcommand property?  Can someone assist me with the syntax for creating the expression?

     pages_20101006.`date` AS full_date,
     pages_20101006.`cat` AS category_no,

Thanks very much,



reportviewer date parameter and calendar.. not working and javascript errors??



Hi, I've got this ssrs 2005 report that works great passing a few
security related parameters from asp.net codebehind. However, there
are two date related parameters that won't be coming from my web form,
but rather from the report form itself. When I test the report's date
parameters from visual studio it work fine, but when I attempt the
same report from a reportviewer no matter what input I place on the
report's date fields or even if I select the date picker, the report
simply resets to default and reloads. And actually the date picker
from the reportviewer does not not even pop up.


Here's my aspx code:

<%@ Page Language="VB" AutoEventWireup="false"
Inherits="_ReportViewer" MasterPageFile="~/Main/MasterPage.master"
    CodeFile="~/Reports/CashSales.aspx.vb"  Title="Cash Sales" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms,
Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content1"

SSRS Date Time value in parameter, pass SP



I had a strange problem last week in few SSRS Reports, scheduled in a report server.

SSRS Report

This report uses StartTime and EndTime parameters defined as 'String' data type and the default value is populated from a dataset. (Format of String, 10/29/2010 6:00:00 AM)

The report uses a stored procedure (stored_proc) to pull the report data from the SQL Server database for display in the report.

The SP stored_proc uses 3 input parameters named below
@par1 nvarchar(4000)
@StartTime nvarchar(20)
@StopTime nvarchar(20)

It was worked well for the past one year, but suddenly it stop run in production and throws the below error.

System.Data.SqlClient.SqlException: Conversion failed when converting datetime from character string.

When we look at the SP, the below line of code throws the error(CreateDate is the database table column).

Where (CreateDate >= @StartTime AND CreateDate < @StopTime ) 

From the profiler log, we understand that the below statement was triggered by SSRS.

exec stored_proc @par1=N'4',@StartTime=N'10/29/2010 6:00:00 AM',@StopTime=N'10/29/2010 6:00:00

ssrs dropdown parameter with Week startDate and end date so that user selects only week and report s


Hi all,

I have a report where I have to show the Week start and end date in the dropdown instead of the date range. Please advice me how to proceed with this report parameter. Thanks a lot in advance, all help is appreciated.


Search in (multiple value) Parameter (for usage in WHERE-clause)


Hi there,

I'd like to give you a little bit of a background story first in order to explain my problem better:

I have created a report, where there is a parameter with multiple values - in this case country codes like DE, DK, FR, GB etc. .
These values are selected with the help of a query out of a MS SQL 2008 database (Navision).

Now the problem is, that in the customer-database where the single lines contain the information of the country code, there is a country code for each foreign customer, but not for the domestic customers. These are simply blank.
Apparently this can not be changed easily and I have to cope with it.

Example of the problem:

Let's say that the domestic country is DK. So there is no actual value for customers of DK, just a blank 'value'.
The parameterlist contains DK because it is in the country database, where I get the information from.

So if the reportingservices user selects something in the parameter like "DK, GB", I could query something like:

SELECT bla, blub, [Country Code]
FROM    Customer
WHERE  [Country Code] IN (@Country_Paramater, '')

The , '' because I also want to have the empty country codes.  This works fine... until I decide NOT to show domestic data in the parameters.
Example: Reportingservices

What is the correct way to remove the authors and date from search results?


I'm trying to remove Authors and Date from the search results on my Search Core Results page.  I've succeded in doing so by editing the Search Core Results web part, using the XSL editor and commenting-out or removing the section that begins with <div class="srch-Metadata2">. 

Could that cause any issues moving forward?  Is that the best method to hide these attributes?  Any advice is appreciated. 

Matt H.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend