Skip to content

How to save only the date in a DateTime Column #3082

Answered by simolus3
gliden asked this question in Q&A
Discussion options

You must be logged in to vote

Do you need the datetime expression APIs? If not, I'd suggest defining a type converter that maps DateTime values (or a custom type you have that only supports year-month-day) to strings and define the respective columns as text.

If you do, it gets a little weird but you can define a type converter that maps from DateTime to DateTime values, apply that to your date time columns and perhaps drop the time part there?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gliden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants