change Date format from the web from parameter

6 posts, 0 answers
  1. Suriya
    Suriya avatar
    50 posts
    Member since:
    Jan 2009

    Posted 06 Mar 2009 Link to this post


    Sir i have completed the subreports sucessfully with your co-operation..

    Our project has to come to an end.,

    Now i have doubt in change the format of date parameter which is passed thru the web form.,

    if i want to convert the date format inside the stored function is easy one,. but here we want to convert the date formet of the parameter winch is passed from the web form..


                  Input :      01/01/2008  (thru web form)

                  output :  01/01/2008 12:00:00 AM (in the report)

    But i want to print as what is given i.e., 01/01/2008

  2. Steve
    Steve avatar
    10940 posts

    Posted 10 Mar 2009 Link to this post

    Hi Suriya,

    You can use the Format property of the textbox item bound to your datetime field and set it to {0:d} for the case you describe.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. anusha
    anusha avatar
    1 posts
    Member since:
    Dec 2010

    Posted 30 Mar 2011 Link to this post

    Can you please help me on this? i have created report called (userReport.vb) using Telerik Reporting Q2 2010. currently i am passing 2 parameters fromdate and todate in userReport.vb. i want to takeout these 2 parameters from  userReport.vb and want to pass the two parameters (fromdate and todate using RADDatePicker) via webforms to userReport.vb to filter the records in userReport.vb. I am new to programming. so can u pls help me in this in detail.

  4. Peter
    Peter avatar
    1671 posts

    Posted 04 Apr 2011 Link to this post

    Hi anusha,

    Generally we provide Report Parameters that can handle this scenario without any coding. They can be easily used in Filter Expressions and if the ReportParameter.Visible property is set to True the ReportViewer will add automatically UI editors for them. However, if you still insist on using separate controls then you will still need a report parameter but the Visible property should be set to false and then you can pass the values to those report parameter as shown in the following code snippet:

    Protected Sub Page_Load(sender As Object, e As EventArgs)
        Dim report1 = New Report1()
        report1.ReportParameters("MultiValueParameter1").Value = New Object() {1, 2}
        report1.ReportParameters("Parameter2").Value = myDateValue
        ReportViewer1.Report = report1
    End Sub

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Devanand Chahal
    Devanand Chahal avatar
    26 posts
    Member since:
    Mar 2009

    Posted 15 May 2012 Link to this post

    Is there any way that only the date part get inserted in the database(Oracle) instaed of DateTime , Is there any settings from Telerik which need to be modified to insert the Date part only, Any config settings or what...????
  6. Peter
    Peter avatar
    1671 posts

    Posted 15 May 2012 Link to this post

    Hello Devanand,

    To directly access the DateTime type Date property as shown in the following expression:
    = Parameters.Parameter1.Value.Date

    If the suggestion don't cover your requirements our suggestion is to convert the DataTime parameter value to a custom format/type with an user function

    All the best,
    the Telerik team

    BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Back to Top