.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

To Pass date in view at runtime!! Can anyone help Very Urgent

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :Sql Server
Hey I have to pass the Bussiness date in my query at run time I have tried the query below but not able to Execute it. Select * from table name where and RT.BUSINESS_DATE = ? --if only one date --if between two dates and RT.BUSINESS_DATE Between ? and ? Can Any one help me with the Syntax. Will be greatfull!!!

View Complete Post

More Related Resource Links

Calculated date field displays differently in List View and Data View web parts

In SharePoint GUI I created a simple custom list with a calculated Date/Time field (Due).  The calculation is =[Created]+7.  I'm trying to display this data on a page using a DVWP.  But first, for testing purposes, I also created a second calculated Date/Time (TestCreate) field in my custom list that is simply =[Created]. In the List View from within SharePoint, the dates show as expected (for example): Created = 8/12/2010 3:45 PM Due = 8/19/2010 3:45 PM TestCreate = 8/12/2010 3:45 PM In SharePoint Designer, I added a Data View web part and the above three data elements (each configured to display mm/dd/yyyy hh:mm:ss tt).  I see the time displayed for the example list item as: Created = 8/12/2010 3:45:30 PM Due = 8/19/2010 10:45:00 AM TestCreate = 8/12/2010 10:45:00 AM I've tested a couple scenarios and the calculated fields always display five hours in the past (along with dropping the seconds).  It seems like the DVWP is returning the date in a different time zone (with no seconds).  The lcid is set right (1033).  I didn't see any time zone settings for the DVWP specifically.  I'm basically stuck.  Could someone help me figure this one out. Thanks.

How to get "Current Date" on SharePoint Designer for Invoice Ageing Data View Report??

Hi Experts, I would like to know how can i get/show "Current Date" in SharePoint Designer ?? Any good tutorial ? FYI, I need this "Current Date" for my Ageing Data View Report, Purpose To offset with "Invoice Receive Date" to get total days of payment payable for the invoice. Please assists, Thanks

Ajax Calendar Extender Question (about disable pass date)

HiI am wondering if it has anyway to disable the past day on the Ajax Calendar Control, previously, when we use CalendarExtender, we need to put a asp:Calendar and a textbox. we can use FindControl to find the calendar control and disable the past days.I am wondering is there anyway  could do the same stuff?Another question is how could I read the user selected date to the Date variable?Do i need to convert the date from the TargetControl ? E.g. Convert.ToDateTime(txt_DATE.text) ?Please let me know if you want me to explain more.Many thanksChi 

How to pass page column value to data view parameters

Hi All, I have a page library with custom column, lets call it "FormCourseId". On that page I have data view which retrieves data from custom list filtered by page column "FormCourseId". In parameter wizard creates the following tag <ParameterBinding Name="ListCourseId" Location="Form(FormCourseId)" DefaultValue=""/> Then I try to use that parameter in XSLT of data view as a filter creteria.  <xsl:param name="CourseId"></xsl:param> It does not work for me. If I change data view parameter source from Form to Query String and pass parameter as url one it works fine. What is wrong with page column parameter binding? May be if FormCourseId column is not presented in form layout as a field(I do not need to show that field in user form of the page) it could not be treated as form parameter?

Is it possible to pass more than one ViewModel to the View?

In my page there is a Login form. It looks like <form action="" method="post"> Login: <%:Html.TextBoxFor(m=>m.Login) %><br /> Password: <%:Html.PasswordFor(m=>m.Password) %><br /> <input type=submit value="Log In" /> <%: Html.ActionLink("Forgot my password","forgot","account") %> </form> But at the same time in this page I need to render some info from another ViewModel. Is it possible to write in action something like return View(Model1, Model2); ?And how could I get access to these ViewModels in this case?

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

Urgent Expression Request - Date Conversion


Input Date : 4/08/2010 6:27:00 AM


Output Required: 2010/08/04 


Expression used : SUBSTRING(@[User::ExtractionDate],1,FINDSTRING(@[User::ExtractionDate],"/",1) - 1) + "-" + SUBSTRING(@[User::ExtractionDate],FINDSTRING(@[User::ExtractionDate],"/",1) + 1,2) + "-" + SUBSTRING(@[User::ExtractionDate],FINDSTRING(@[User::ExtractionDate],"/",2) + 1,4)

Current Date is getting: 4-08-2010




Getting records that 7 days pass today's date


I want to get all records that are 7 days pass today's date and not equal to today's date.  Don't know how to write it so I can get records 7 days old but with this procedure I'm still getting records that are due today.  Hope this makes sense.  Can someone assist me.

select * from libraryrequest
where  duedate > getdate() and duedate != getdate()

how do it i created a Grid view that contain onecoloum Expiredate a i require the date compare to


i created a Grid view that contain onecoloum Expiredate a  i require the date compare to today date if it is

  Todaydate<=Expiredate (difference 30 days then color is red
  Todaydate<=Expiredate (difference 15 days then color is blue
  Todaydate<=Expiredate (difference 5 days then color is yellow
    id Expire date  Filename
    1  22/08/10      a(Red )   
    2  22/09/10     b(yellow )
    3  8/09/10      c(green  )
    how do it

how to restore view style to default... urgent


dear friends,

I have changed default font size of '.ts-syslabl' in view style of "Boxed" for a page. But it is reflecting in all view styles. May be i corrupted main css core file or vwstyles file with respect to that site collection. How to restore to default file with respect to css. Kindly help me out . It is urgent ...please.. It is the problem with only one site collection in which i tried.

I used Sharepoint designer 2010 .

pleasehelp me out

How to get Email of Current User Data View Web Part Sharepoint 2010 and pass to WebService data sour

I have to pass in the email address of the current user to a web service data source (run time) of a Data View Web Part.

My Question is:

a) How can I get Email address of current user based  in DVWP.
I know we can get the CurrentUser using the CurrentUserName but how do we get the Email for the Current User.

b) After getting the Email how do we pass to the Web Service.

Pass information from one web service to another web service in the same data-view-web-part


In Data View Web Part.

Is it possible to pass information from one web Service data source connection to another web service data source connection within the same Data Form Web Part to get information from second web service?

What I am trying to achieve is to get user email address from the User Profile Web Service and pass in to another web service to get information.

Please advise if it is possible.

format date in data view




How do i convert date which is entered in mm/dd/yyyy format to dd-AUG-yyyy format in data view?Is there an xslt code for it?


Thank you.

Please help URGENT - how to pass XML from aspx page to Stored procedure


Hi all,

I would like to take your help for a small task of mine. I have dataset whose contents have been converted as xml, the contents of which needs to be sent to a stored procedure. How do i go about creating methods in the data layer and the stored procedure.

What should be parameter type in the data layer's method and what should be the parameter type in the stored proc. I dont want to use a varchar at the stored proc level because it is limited to a length of only 8000 characters. Please suggest a solution

I would be glad if someone could post some sample code.

View Flowdocument XAML at runtime


Hi, I have a richtextbox with an embedded flow document such as:

    <RichTextBox Name="richTextBox1">
      <FlowDocument x:Name="fdMain">
        <Paragraph>Paragraph Text</Paragraph>
At runtime I am programatically adding new paragraphs, and formatting text etc. Is there a way I can display the xaml of the richtextbox (and, hence, flowdocument) as it is updated at runtime?



How to Pass data(not the part of model) from View to Controller?


How Can I Pass data(not the part of model) to Controller from View?
View Code

<%= Html.ActionLink(item.Name, "ActionName", "ControllerName", new { companyID = Html.Encode("abc"), ID = Html.Encode("xyz") })%>

Controller Code

public ActionResult ActionName(string companyID , string ID)

Any idea?

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