locked
Change date format in report viewer RRS feed

  • Question

  • User-1169942342 posted

    Hi all,

    i am facing a problem to change date format in report viewer:

    here is the output i get it:

    Date Sent Date Repaired
    1900-01-01 12:00:00 AM 1900-01-01 12:00:00 AM
    2011-02-01 12:00:00 AM 2011-02-03 12:00:00 AM
    1900-01-01 12:00:00 AM 1900-01-01 12:00:00 AM

     

    the output 1 want is 2011-02-01 , i don want display the time.

    and if the date is 1900-01-01 12:00:00 AM, i want the report show "-"

    Below is the sample output i want. pls help:

    Date Sent Date Repaired
             -              -
    2011-02-01 2011-02-03
             -              -

     pls help...

    Saturday, February 19, 2011 6:19 AM

Answers

  • User-624088818 posted

    =IIF(Year(Fields!DATE_SENT.Value)=1900,"-",Format(CDate(Fields!DATE_SENT.Value),"yyyy-MM-dd"))

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 22, 2011 12:30 AM

All replies