Forum OpenACS Q&A: Data modeling: leaving day of month out

Someone is asking me to make the day of the month optional.

This is on an ACS 3.4 system, and the data model currently is

start_date  date,

(this is Oracle).

How would you go about making the day of the month optional? Would you have to separate out the month, day, and year? That would be annoying.

Anybody else have any cleverer ideas?

Collapse
Posted by Tilmann Singer on
I don't know exactly what 'day of the month optional' means, but what stops you from always setting your date field to the first of each month if the day is not relevant, and add a

start_date_includes_day_p  char(1)

to indicate how the date should be formatted?