© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
6 replies
Thinker

Best way to serialize a date without a year [Answered]

I want to serialize a date, ideally in such a way that it could be deserialized into a
DateOnly
DateOnly
. I don't really need the year, and I would also like to be able to include February 29, so I can't just serialize it as
"02-29"
"02-29"
or something as that is year 0001. Is there any good way of serializing a specific date like this?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Best way to implement a regex based lexer [Answered]
C#CC# / help
4y ago
e different names during Serialize and Deserialize [Answered]
C#CC# / help
4y ago
Get longest consecutive date 'streak' [Answered]
C#CC# / help
4y ago
EF without ASP.NET? [Answered]
C#CC# / help
4y ago