Hidden expression with dates?

Hi! How to write the syntax when you try to compare the dates. In this case I try to check if the date is empty(then it's 1/1/1900) then the field should be hidden. This is what I tried but didn't succeed:

=iif(Fields!ModifiedDate.Value="1/1/1900",true,false)



Answer this question

Hidden expression with dates?

  • Alba

    You can convert your string value ('1/1/1900') to a date with the CDate() function. With this you can compare the to value's with each other.

  • parlance

    It just the otherway round: =iif(Fields!modifiedDate.Value=CDate("1/1/1900"), false, true)



  • Warren13

    Jan Pieter Posthuma wrote:
    You can convert your string value ('1/1/1900') to a date with the CDate() function. With this you can compare the to value's with each other.

    Thanks for the post but unfortunately I didn't get it. The main problem is syntax - I don't know where to use Cdate() -function. I tried this:

    =iif(Cdate(Fields!modifiedDate).Value) > "1/1/1900",false,true)

    the compiler didn't like it :)

    Can you give me an example


  • Hidden expression with dates?