Automapper Formatter not working
问题 I'm trying to add a formatter to my Automapper configuration to style all DateTime? fields. I've tried adding my formatter globally: Mapper.AddFormatter<DateStringFormatter>(); And on the specific mapping itself: Mapper.CreateMap<Post, PostViewModel>() .ForMember(dto => dto.Published, opt => opt.AddFormatter<DateStringFormatter>()); But neither seems to work - it always outputs the date in the normal format. For reference, here is the ViewModel I'm using, and the rest of the configuration: