How to check between 2 dates?

How to check two dates?

For example:
Date 1: 04/01/2023 (dd/MM/yyyy)
Date 2: 10/01/2023 (dd/MM/yyyy)

I only want to show a message from 01/04/2023 to 01/10/2023, this means that on 11/01/2023 the message should no longer be displayed.

image

1 Like

Don’t use as date format, instead use as number format like ddmmyyy

Now check the current date is greater than first date and less than the second date

You should use and function from logic

Greater than first date and less than the second date imagine first date is 01011992 and the second date is 01012023 and the current date 05122022 you should use

If current date is greater than 01011992 and current date is less than 01012023
Then alert as Yes
Else alert as No

Or you can use this extension


If the date isAfter and isBefore
Then ....
Else ....

DateTools : Some tools to work with date and time by @vknow360

Hi thanks, but no work.

1 Like

In month place. whydo you use MMMM? Also date1 and date2 are common why? It is missing which date you want to compare with isBefore and isAfter

I already made the changes, but it still doesn’t work

Working fine… if it not work then you have not designed the logic correct … please correct your logic

While setting date the condition you must use is date1> date2 then only it will give you correct result as true or false else it will always return false

2 Likes

Working, thanks very much!

1 Like

friend in this case
How could I search a list?

@Still-learning

Can you explain more? What you are expecting…

it’s taking too long to load the image

I have a list
with date and names and counts
search for certain dates
initial and final
and bring me back
follow block…

Pls give your blocks in English

Do you want to extract all the details between two date from your database? Is your database is in sheet?

Yes that’s right
the data is coming from the spreadsheet

I bring them and leave them in the list view, I search the list for the date I want

with a date only with you
but with the
two I’m not getting

if you can help me
appreciate

@Still-learning

Just use query formula…

select A, B, C where A > date ‘date picker1 text’ and A <= date ’ date picker2 text’

Just add this query in the web url, automatically you will get results

Try to maintain date in this format in gsheet YYYY-MM-DD

In the above 1 to 8 is total data, 11&12 sets the between dates and I query between these dates


my blocks

all data is already in a normal list
I just put a date and I can select what I expect

but I would like to pull for two dates

I’ll send what I have

@Still-learning

Send me sample aia either here or DM me

1 Like

take a look friend

one of the screens

@Still-learning
Controle_Palito_Doce_beta.aia (4.4 MB)

inorder to work you need to create one more col with datevalue into number and try to select the col values between the numbers

can you show

@Still-learning

Are you there still? shall i tell you… I was busy in attending two function

1 Like

aki breaking the cuca

@Still-learning