Ask Your Question

How to make week and day concur in LibreOffice Base?

asked 2018-06-27 19:16:53 +0200

Quarto Die gravatar image

updated 2020-07-27 00:22:26 +0200

Alex Kemp gravatar image

I am working on a split database in Libre Office Base Version:, on Linux Mint Sylvia. I have a calendar in which I need the week numbers in the year and the day numbers. UPDATE "NEWYEAR" SET "DAYNUM"= DAYOFWEEK ("Date") UPDATE "NEWYEAR" SET "Week" = WEEK ("Date")

Now when I request the daynumbers (the number 1 is Sunday as the first day of the week. But when I request the week number as above, Sunday is the last day in the week.

How do I get these numbers to concur. I would prefer to have Sunday as the first day of the week in both cases if that is possible.


edit retag flag offensive close merge delete


e.g. Sunday, January 21, 2018, is listed as last day in the 3rd week in the year, but as day number 1. On my Linux system date-time settings choosing either Sunday or Monday as the first day of the week will not make these Week and Day concur on which is effectively the first day.

Quarto Die gravatar imageQuarto Die ( 2018-06-27 19:51:08 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-06-27 22:25:38 +0200

Ratslinger gravatar image

updated 2018-06-27 22:35:04 +0200


Day of week is determined by the database you are using. Some can be set to whatever you want. In HSQLDB day of week starts with Sunday ( = 1). However, when dealing with WEEK, the day of week starts with Monday. This has nothing to do with the OS and how it may be set (however locale may come into play).

For some interesting insight into this, see the answer by chrisb (dated 2015-02-05) in this post -> How do I change start of week in OpenOffice 4.1 Based upon that post & strictly upon using dates in 2018, here is a test done:

image description

edit flag offensive delete link more


I'm wondering again and again at things as they are. There were good reasons to devolp standards, and there are standards. ISO 8601 defines the monday to be the first day of any week, and week number 1 to be the first week of which more than 3 days are in the new (or next) year. Why does software not simply apply the negociated and approved standards?
As far as I know there is no second standard rightfully competing with ISO 8601.

Lupp gravatar imageLupp ( 2018-06-28 08:44:24 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-06-27 19:16:53 +0200

Seen: 123 times

Last updated: Jun 27 '18