locked
ssrs parameter get time value in data parameter RRS feed

  • Question

  • hi all,

    i set a date parameter in report and i want user to input time with it. how it is possible? because if parameter type is date, and use select the date from drop down calendar, there is no time.

    is there way to get time in the date/time paramter, don't want default value and also validate it.

    thanks,
    p
    Saturday, February 6, 2010 1:30 AM

Answers

  • Hi Parry,

    Add 2 new parameters for HH and mm. Append first date parameter with values your get for hh:mm

    =(DateAdd("m",DateAdd("h", Parameter!Date, Parameter.Hour), Param!Mins)



    I accidently clicked on propose as answer.
    Sorry for Propoing answer by mistake.
    Please vote for answer if it helps you.
    • Proposed as answer by MSBIProgrammer Saturday, February 6, 2010 2:52 AM
    • Marked as answer by Jerry Nee Tuesday, February 16, 2010 7:59 AM
    Saturday, February 6, 2010 2:52 AM
  • Hi parry,

    I think the solution provide by jayeshonline should be workable for your purpose. Please try and let us know if you have more questions.

    Note: the date interval for minutes should be "n", not "m"(for month), so the expression should be something like this: =CDate(DateAdd("n",Parameters!MM.Value,DateAdd("h",Parameters!HH.Value,Parameters!Date.Value))).

    thanks,
    Jerry
    • Marked as answer by Jerry Nee Tuesday, February 16, 2010 7:59 AM
    Monday, February 8, 2010 7:44 AM

All replies

  • Hi Parry,

    Add 2 new parameters for HH and mm. Append first date parameter with values your get for hh:mm

    =(DateAdd("m",DateAdd("h", Parameter!Date, Parameter.Hour), Param!Mins)



    I accidently clicked on propose as answer.
    Sorry for Propoing answer by mistake.
    Please vote for answer if it helps you.
    • Proposed as answer by MSBIProgrammer Saturday, February 6, 2010 2:52 AM
    • Marked as answer by Jerry Nee Tuesday, February 16, 2010 7:59 AM
    Saturday, February 6, 2010 2:52 AM
  • Hi parry,

    I think the solution provide by jayeshonline should be workable for your purpose. Please try and let us know if you have more questions.

    Note: the date interval for minutes should be "n", not "m"(for month), so the expression should be something like this: =CDate(DateAdd("n",Parameters!MM.Value,DateAdd("h",Parameters!HH.Value,Parameters!Date.Value))).

    thanks,
    Jerry
    • Marked as answer by Jerry Nee Tuesday, February 16, 2010 7:59 AM
    Monday, February 8, 2010 7:44 AM