Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dranjbar
Contributor III
Contributor III

Button - Selecting the dates in the past 30 days

Hi all,

I'm trying to make a button which selects the date range of the past 30 days.

Currently my code for selecting todays date works - =date(today())

My code for selecting the date 30 days ago works - =date(today()-30)

 

Although I cant seem to get the code right for the selection of all the dates in the last 30 days.

I've been reading the forums and I can see code like this (and variations of this) - ='>=' & date(today()) & '<=' & date(today()-30)

But it doesn't seem to work in my occasion (It seems that I cant get the greater than or less than signs to work with my button).

 

This is where I am inputting my data.

dranjbar_0-1605584386691.png

 

Is anyone able to help me with this?

Thanks in advanced!

 

 

6 Replies
MayilVahanan

Hi @dranjbar 

Try like below

='>='&Date(Today()-30,'YYYY-MM-DD')&'<='&Date(Today(), 'YYYY-MM-DD')

Change the date format based on ur date (YYYY-MM-DD)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
dranjbar
Contributor III
Contributor III
Author

Hi @MayilVahanan 

Unfortunately this is still not working, I can select a date fine, I just cant select a range of dates.

MayilVahanan

Hi @dranjbar 

Can you send a sample file

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
saimahasan
Partner - Creator III
Partner - Creator III

What is your date format?

dranjbar
Contributor III
Contributor III
Author

Hi @saimahasan 

My date format is DD/MM/YYYY

EliGohar
Partner - Creator III
Partner - Creator III

@dranjbar 

Make sure you select the following action:

EliGohar_0-1614697536030.png

Eli.