cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
94zeba
New Member

Calculate Date difference in canvas app

Hi,

 

I am confused and hoping someone can help as I am new member.

 

I want to display day period in one label, How can I get that?

 

Please help.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
BJ94
Resolver II
Resolver II

HI @94zeba 

 

If you want to calculate the days between two dates you can use following formula:

 

DateDiff(DateTimeValue(DatePicker1.SelectedDate),DateTimeValue(DatePicker1_1.SelectedDate),Days)

 

On label Text property you can apply this formula.

 

-------------------------------------------------------------------------------------------

Regards,

Bharti

Community Support Team _ Bharti
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

BJ94
Resolver II
Resolver II

Hi @94zeba 

 

You can take another label and you can add following formula on that-

DateDiff(
DateTimeValue(DatePicker1.SelectedDate),
DateTimeValue(DatePicker1_1),
Hours
)

 

-------------------------------------------------------------------------------------------

Regards,

Bharti

Community Support Team _ Bharti
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
BJ94
Resolver II
Resolver II

HI @94zeba 

 

If you want to calculate the days between two dates you can use following formula:

 

DateDiff(DateTimeValue(DatePicker1.SelectedDate),DateTimeValue(DatePicker1_1.SelectedDate),Days)

 

On label Text property you can apply this formula.

 

-------------------------------------------------------------------------------------------

Regards,

Bharti

Community Support Team _ Bharti
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@BJ94 

 

Thank you for reply. 

 

Can we get time difference between two dates?

 

BJ94
Resolver II
Resolver II

Hi @94zeba 

 

You can take another label and you can add following formula on that-

DateDiff(
DateTimeValue(DatePicker1.SelectedDate),
DateTimeValue(DatePicker1_1),
Hours
)

 

-------------------------------------------------------------------------------------------

Regards,

Bharti

Community Support Team _ Bharti
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,268)