Pasta
Pasta

Reputation: 2491

Calendar control date not known (ASP.Net)

Sometimes we have dates that are unknown, eg: We won't know the date but just the month and year.

eg: --/Dec/2015, the date is not known? How do we accept these kind of values?

Any ideas on can this be stored on SQL Server database?

Upvotes: 0

Views: 36

Answers (1)

Arion
Arion

Reputation: 31249

I would store it as a date in the database. Because with a date you have benefits like:

  • Calculation function like DATEADD and DATEDIFF.
  • You will be able to sort on one column
  • Index will be one column
  • When you need to get the year and the month. You just use MONTH and YEAR

Upvotes: 1

Related Questions