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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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:
  • 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
    Microsoft Employee 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard