Custom date format YYYY

LO 7.2.0.1 Win 10 64 Pro

I have a 600 row Calc file I’m trying to prep for import into a newly created Base DB. The Calc file has two columns with date info, “Year Released” and “Year Watched” These columns contain only the year, in 4 digit format. When I try creating a custom YYYY date format, all the data in the columns gets overwritten with “1905”. Because of this, I have several questions:

  1. Is there a way to apply this format and retain the year info?

  2. Is “Date” the best format to set these columns for import into Base?

  3. If not, what format should I set them as?

I was hoping to import the Calc file directly into Base to reduce data entry. The year info will be important for queries, so it needs to be a numeric format of some sort anyway. Thanks for any pointers!

There is no data type for YEAR in the internal database. You get ‘1905’, because the value is counted from 31.12.1899 + … days.

Try to use SMALLINT instead. It allows values from - 32768 to + 32767. For input new values in such a table you could define the form control to allow only values from 1950 to 2100 or something else.

2 Likes

Thanks! I had got as far as figuring out that some sort of input mask would be the way to deal with future entries, SMALLINT will do nicely for the existing ones. Much appreciated.