I have a requirement to capture historical events in a table. Now some events will have only Year, some Year/Month, and remaining where Date is known.
We should be able to store them in the column and be able to sort etc. When publishing the information, we should be able to publish as was the input, Year only, Year-Month only, or Date.
I looked at the newer Date data type. I can insert a 4 digit year, but on retrieving it is YYYY-01-01. I do not know if it has input YYYY or YYYY-MM-DD and is indeed a Date or a Year. I am trying to avoid saving the format information in another column or
For sorting, when records have same Year, I would have another column to do relative sorting...
So question is - what are my best options with SQL/Entity Framework combo. And what others have done, when encountering similar - if any.
Thanks in advance.
View Complete Post