cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lovishsood1
Helper II
Helper II

Extract Dates between Two Dates

Hello Everyone,

 

Problem :

I have two columns -- 

From-Date & To-Date.

Data Stored : 

From Date: June 14,2022.

To Date: June 17, 2022.

 

I have taken a Gallery where I'm showing data on the basis of Dates. Now, I want to show data on June 15 & 16 also. 

My Code : 

Filter(table1,(Text(tm_fromdate,"dd/mm/yyyy")=Text(VarCurrentDat,"dd/mm/yyyy")) || (Text(tm_todate,"dd/mm/yyyy")=Text(VarCurrentDat,"dd/mm/yyyy")))

 

Currently, This is showing me data on June 14 & June 17. 

I hope, my problem is understood. 

I want to show the same row data on June 15 & June 16 also. 

 

P.S.: VarCurrentDat - Variable where I'm storing current Date. -- (Set(VarCurrentDat,Now()))

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@lovishsood1 

This should work better for you:

Filter(table1,
        VarCurrentDat >= tm_fromdate 
       && VarCurrentDat <= tm_todate
)

View solution in original post

3 REPLIES 3
timl
Super User
Super User

@lovishsood1 

This should work better for you:

Filter(table1,
        VarCurrentDat >= tm_fromdate 
       && VarCurrentDat <= tm_todate
)

Thanks a lot!! 🙂

What If I want to show Session 1 and Session 2 along with From and To Date?

How can I achieve that?

 

Eg; June 14 - Session 1(If , FromSession= Session 1) , June 15 - Full Day , June 16 Full day and June 17 (Session 1 or Full Day (If ToSession = Session 2)

 

 

FromSession and ToSession are column names, storing value either Session 1 or Session 2. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,271)