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 / Patch date and time, t...
Power Apps
Answered

Patch date and time, time not showing

(0) ShareShare
ReportReport
Posted on by

Hi

 

I'm trying to patch date and time to SharePoint List. But the time value is shown as 00:00

let me know what is wrong with the below code

 

Patch(ExternalAccess,LookUp(ExternalAccess,ID=galID),
{FormStatus:"Access Revoked",
 RevokedBy:LogInUserName,
 RevokedDate:DateValue(
 Text(
 Today(),
 "[$-en-US]dd-mm-yyyy hh:mm AM/PM"
 ),
 "en-GB"
 ),
 
RevokerComment:RevokeComment_2.Text 
});
 
If(IsEmpty(Errors(ExternalAccess)),Notify("Record Has Been Updated Successfully");Navigate(AccessGallery,ScreenTransition.Cover),
Notify("The Process Could Not Be Completed, Record not Added"))

 

Categories:
I have the same question (0)
  • rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    hi @indhaa try DateTimeValue 

  • Abhilash_Swain Profile Picture
    901 on at

    change DateValue to DateTimeValue

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @indhaa 

    Change your RevokedDate part of the formula to the following:  RevokedDate : Now()

    Also, ensure that your column definition for RevokedDate also includes times and not just date.

     

    Your use of the DateValue and the Today() functions will only return dates, not times.

     

    However, at the same time, there is no need to convert a datetime value to a string and then convert it back to a datetime value - which is what you are doing in that formula.  

     

    So, just change to the above formula and you should get both date and time in your datasource.

     

    I hope this is helpful for 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

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard