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

Community site session details

Session Id : kKvq+R8PunIFOHmWFIOsvf
Power Apps - Building Power Apps
Answered

Time not displaying in Editform

Like (0) ShareShare
ReportReport
Posted on 23 Apr 2019 13:19:43 by

I have a sharepoint list and one of the columns is  Date Time.  In powerapps when I try to edit a form it displays the date correctly but the hours and minutes display as 0.

 

This is the default value for the hour and minutes 

If(EditForm1.Mode=FormMode.New,(Right(Text(Now(), "[$-en-US]hh:mm"), 2)),Text(Parent.Default))


When it's a new form it displays the correct date and time, but when I try editing an existing record it loads the date but the time is set to 0.

I am thinking it might be something with Parent.Default ?

Categories:
I have the same question (0)
  • Rebetcha Profile Picture
    645 on 23 Apr 2019 at 13:58:47
    Re: Time not displaying in Editform

    Hi @Anonymous ,

     

    Is it possible that you did not turn on the Include Time option for your SharePoint column?

    By default a Date and time column in SharePoint is date only. 

     

    DateTimeColumn.png

  • Community Power Platform Member Profile Picture
    on 23 Apr 2019 at 14:02:33
    Re: Time not displaying in Editform

    I verified that Date and Time was selected.

  • Rebetcha Profile Picture
    645 on 23 Apr 2019 at 14:31:13
    Re: Time not displaying in Editform

    Hi @Anonymous ,

     

    In that case I think the issue is in what is saved to SharePoint when you submit the form.

    The formula you shared states that the current time is loaded in case of a new item. Is the form not in New-mode, than Text(Parent.Default) is loaded. 

    If(EditForm1.Mode=FormMode.New,(Right(Text(Now(), "[$-en-US]hh:mm"), 2)),Text(Parent.Default))

     Can you please share the following information?:

    • Which controls you use within the data card connected to DateTime column.
    • What the formula is in the update property of this data card.
  • Community Power Platform Member Profile Picture
    on 23 Apr 2019 at 15:16:55
    Re: Time not displaying in Editform

    Hi @Rebetcha 

     

    I am using the standard control when you import from sharepoint.  The date field is a date control and the hours and minutes are a drop down. 

     

    The DataCard contains the following update :

    DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0)

     

  • Verified answer
    Rebetcha Profile Picture
    645 on 23 Apr 2019 at 15:48:41
    Re: Time not displaying in Editform

    Hi @Anonymous ,

     

    I think the issue is that you forgot to add the Hour() and Minute() functions in the Default property of the Hour and Minute dropdowns. Below the formulas as they appear when you use a SharePoint DateTime column without unlocking it. 

     

    HourDefault.pngMinuteDefault.png

  • Community Power Platform Member Profile Picture
    on 23 Apr 2019 at 15:53:25
    Re: Time not displaying in Editform

    @Rebetcha  Thank you that was it.

     

    I modified the default value to 

     

    If(EditForm1.Mode=FormMode.Edit,Text(Hour(Parent.Default) ),Text(Now(), "[$-en-US]hh"))

     and it worked.

     

    Thanks for your help.

  • Rebetcha Profile Picture
    645 on 23 Apr 2019 at 16:08:04
    Re: Time not displaying in Editform
    You are welcome! Glad I was able to help you.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard
Loading complete