Expression: Date Format on Report

  • Hi. I have a field on a report that displays a date value. The expression is as follows:

    =FORMAT(Fields!DueDate.Value,"d MMM yy")

    If the date returned = 6 Jun 79 I would like the report to display TBA.

    I tried some variations using IIF but was unsuccessful.

    Many Thanks,

    Phil.

    -------------------------------------------------------------------------------------
    A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."

    Two hydrogen atoms walk into a bar. One says, 'I think I've lost an electron.' The other says 'Are you sure?' The first says, 'Yes, I'm positive... '

    Tommy Cooper

  • I don't have BI studio handy to test but here is what I can come up with.

    =iif (FORMAT(Fields!DueDate.Value,"d MMM yy") = "6 Jun 79", "TBA", FORMAT(Fields!DueDate.Value,"d MMM yy"))

    Also on a side note, I wrote about basic formatting of dates here.

    [font="Courier New"]Sankar Reddy | http://SankarReddy.com/[/url][/font]

  • Sankar just what I was after.

    Many Thanks,

    Phil.

    -------------------------------------------------------------------------------------
    A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."

    Two hydrogen atoms walk into a bar. One says, 'I think I've lost an electron.' The other says 'Are you sure?' The first says, 'Yes, I'm positive... '

    Tommy Cooper

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply