Date Without Time When Serializing

I’m serializing a class in .NET and have a DateTime field.   It’s getting serialized as:


When what I really want is something without the time like this:


Brad Abrams has a great post that has how to do this (plus a lot more).   Simply add this attribute to the property:


This is probably basic to some, but was helpful to me.

This entry was posted in Code/Development, Technology. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *