web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to add time to an ...
Power Apps
Unanswered

How to add time to an existing time?

(0) ShareShare
ReportReport
Posted on by 130

Hi All,

I have a label in which I have time value : 1:00 AM
Code: " Text(DateTimeValue(Dropdown2.SelectedText.Value),DateTimeFormat.ShortTime) "

Now I want to add time to this Label so it becomes 4:30 AM

I have tried dateadd function but it is giving me error.
code: " Text(DateTimeValue(Label),DateTimeFormat.ShortTime) +Text(DateAdd(DateTimeValue(Label),3,Hours),DateTimeFormat.ShortTime) "

Pls help me on this.

Regards,
Rahul


Categories:
I have the same question (0)
  • RusselThomas Profile Picture
    4,014 on at

    Hi @r_voyager ,

    I'm guessing you're trying to add time to text instead of adding time to datetime.  It might help to confirm this by stating what error you're getting and where you're getting it?  Date functions generally only work with Date types and here it looks like you're adding Text + Text.

    Try this to start on a label Text: property;

    Text(DateAdd(DateTimeValue(Dropdown2.SelectedText.Value),3,Hours),DateTimeFormat.ShortTime) 

     Kind regards,

    RT

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @r_voyagerm,

    Have you solved your problem?

    Do you want to format the existing time as 3.5 hours later?

     

    Modify your formula as below:

    Text(DateAdd(DateAdd(DateTimeValue(Label47.Text),30,Minutes),3,Hours),"hh:mm am/pm")

    vqiaqimsft_0-1653988147003.png

     

  • r_voyager Profile Picture
    130 on at

    Thanks for the reply and Yes I solved my problem in same way you showed.

    Regards,
    Rahul

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard