Reputation: 10878
Please see pic
For some reason my expression is not working and I cannot figure out why...
What I'm trying to do is check the UseByDate if it's blank set time to blank AND if pickeddatetime is blank (time field) also set to blank if not blank use pickeddatetime. However my expression doesn't seem to be working correctly for some reason?
=IIF(Fields!UseByDate.Value is nothing, nothing, IIF(Fields!PickedDateTime is nothing, nothing, FORMAT(System.TimeZone.CurrentTimeZone.ToLocalTime(Fields!PickedDateTime.Value), "HH:mm")))
I've checked the pickeddatetime value and it is definitely null for this row.
Upvotes: 0
Views: 619
Reputation: 2651
I think the way the expression is written isn't checking for nothing correctly. Try:
=IIF(IsNothing(Fields!UseByDate.Value)=True, nothing, IIF(IsNothing(Fields!PickedDateTime)=True, nothing, FORMAT(System.TimeZone.CurrentTimeZone.ToLocalTime(Fields!PickedDateTime.Value), "HH:mm")))
Upvotes: 1