Ask Your Question
1

Calc date: can I set a default month and year?

asked 2018-02-02 01:07:22 +0100

Minolo gravatar image

updated 2018-02-02 02:42:35 +0100

I have thousands of dates to enter. The first batch is all January 1890, the second batch is all February 1890, etc.

I know that I can set a default century in Tools>Options>General.

But what I want to know is, can I somehow either:

1) set the year and month to a default, so that I only have to enter the day?

or

2) enter the year, month and day in separate columns, then merge or concatenate them as a date?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2018-02-02 03:00:18 +0100

Minolo gravatar image

updated 2018-02-02 03:40:14 +0100

By searching for Excel advice, I found that this also works in Calc:

=DATE(A1,B1,C1)

where column A is year, B is month, and C is day;

and all values are numerical (i.e. no 'Jan', 'Feb', etc. text strings).

A further nicety: In my case, I have cells where the day value is missing data. I have a dash "-" in there instead, as a place marker, and I want a similar dash marker in the output too. To deal with this situation, I used the DATE function nested inside an 'IF' logical function:

=IF(C1="-","-", (DATE(A1,B1,C1)))

("if the day value is a dash, then write a dash, otherwise write the date")

so that if the day value is missing, I get a dash placemarker in the output date column, instead of a 'value' error.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-02-02 01:07:22 +0100

Seen: 98 times

Last updated: Feb 02 '18