SQL date pattern for dates when the user may not know all the information

The system allows new users to register and enter the date of their wedding. As a purist, I wanted to keep this as a date. After the interview with the user, it was clear that reality was different from this approach. Users are often unsure of the day or month and want to keep partial dates, so "June 2009" or "someday in 2012."

Does anyone know a good design template that lets you store partial dates and then try to create a timeline for a big day - even if there are partial dates?

+3
source share
5 answers

, "" . " 2009 ", 15 2009 +/- 15 .

"- 2010 " 01 2010 180 .

, # .

/ , . . .

+2

.

+3

:

  • -

. , . , .

+2

YYYYMMDD, /, 0. , 20090200 "- 2009 ". , , 1 , .

+1

; , "15 ", . , ?

, , , () ( , , "15- 1974 .).

, , . , , , (- "19740615", "1974 ----", "---- 0615" ..), d .

I think it depends on how much you want to do in the database and how much you want to do in your application. In any case, I think you will reinvent the wheel in a slightly different way. But of course, you're good enough to do some neat, encapsulated, reusable classes - it will be fun !:-)

+1
source

Source: https://habr.com/ru/post/1704261/


All Articles