Another Libra Base Question

Closed
BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 - Aug 19, 2016 at 07:21 PM
BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 - Aug 20, 2016 at 11:10 AM
Woe is me.

Im going to cry :(

I need to know how to do basic arithmatic with dates in Libre Base queries.

All I want to do is find the number of entries that are present for a specific day + 1.

The code I have to get the count for a day you select works and is:
SELECT COUNT( "ID" ) FROM "Raw data" WHERE "Date" = :Start_Date


But how do I do this for a date 1 day in the future from the selected date please? All my efforts have failed dismally.

... and if you are feeling generous, how do I get 2 results displated from a single query where I get the day you select and the next day on seporate lines please?

Virtual beers and my eternal thanks are on offer for the right answer.

I really appreciate thank you messages as a payment for solving issues   :o)
Related:

2 responses

Blocked Profile
Aug 19, 2016 at 07:34 PM
See if your base will allow this:

...Where "date" =+ :start_date+1

It is an attempt.
0
BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 150
Aug 19, 2016 at 07:44 PM
Sadly no beers on this occation.

Serves me right for using Base i suppose ... but its free - thats the only way I can afford to buy the beers.
0
Blocked Profile
Aug 19, 2016 at 08:30 PM
Copy that!

I will keep poking!
0
Blocked Profile
Aug 19, 2016 at 08:33 PM
What if you set the Date +1 as a variable, then call the query on the variable? Does base allow that?

Declare tom_date date = date+1
Select * from thetable
WHERE "date" = tom_date;
0
BrianGreen Posts 1005 Registration date Saturday January 17, 2015 Status Moderator Last seen September 30, 2021 150
Aug 20, 2016 at 11:10 AM
Im not getting anywhere still. Perhaps Im asking too much of Lira Office, but Im dure SQL coding must have this functionality.

Sorry, but still no beer for you - I will have to drink it soon to stop it going flat.
0