Conditional Conversions

Mar 30, 2010 at 4:35 PM

How would I add a conditional to a conversion? I may want to format most DateTime values as "yyyy-MM-dd", but if the source property in question has a specific attribute (e.g. [DataType(DataType.Time)]), how can I choose to format the DateTime value differently (e.g. "HH:mm")? I would need some way of getting at the MemberInfo or PropertyDescriptor before converting the value.

Is this possible?