Calculation of a Date

Discuss the database features
Post Reply
lukemillsey
Posts: 2
Joined: Mon Nov 07, 2016 1:18 am

Calculation of a Date

Post by lukemillsey »

ok im trying to create a database for my window cleaning customers in open office base.
I want to see a column that will show my due date for cleaning.
I am trying to get this by having a formula of my Date cleaned column + Due Every column. e.g. the value in date cleaned being 23/10/2016 and the value of 28 in thee due every column (relating to days) Ive tried so many ways to do this but to no avail. I know exactly how to do this in calc but i want to do it in base.can anyone help me please, using simple language (im new to this program)
I also know exactly how to do this in microsoft access and its really annoying me that i cant seem to do it in base...
Open office 4.1.3
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Calculation of a Date

Post by Villeroy »

Base is not a database. I assume that your Base document is connected to a self-contained HSQL database which is documented here: http://www.hsqldb.org/doc/1.8/guide/ch09.html
This outdated version of HSQL has no DATEADD function like most other databases.
Copy some thousand dates from a spreadsheet into a calendar table and use the DATEDIFF function to lookup dates that are x days in the future.

Code: Select all

SELECT "Xtable".*, CalendarTable"."D" AS "Due" 
FROM "XTable", "CalendarTable" 
WHERE DATEDIFF('dd', "XTable"."Date","CalendarTable"."D")=30
You can also install the "Report Builder Extension" which provides additional functions for reporting.

If you really want to use your database for productive purposes, you should definitively convert your database to an external database driven by a recent HSQL2, which comes with a DATEADD function. See Base tutorials viewforum.php?f=83
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
lukemillsey
Posts: 2
Joined: Mon Nov 07, 2016 1:18 am

Re: Calculation of a Date

Post by lukemillsey »

i appreciate your reply, but i dont understand most of it unfortunately. If your saying that base is not a database then that must be why its not working. I just assumed that open office was a similar version of what microsoft office is. like writer is a replacement for microsoft word and calc is a replacement for excel and base is a replacement for microsoft access. I dont want the hassle of having to put all dates in a excel file and then getting it to refernce that. I just want it to work like microsoft access does. Is there some way i can transfer my base database (table) to a document readable in access? I dont want to have to input it all again? thanks. Luke
Open office 4.1.3
Post Reply