cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PerKou
Regular Visitor

How to change the date format when patching SP

Hi all!

I want to patch a "date & time" column on SharePoint and Date: Now() is working OK on the app, pathing SharePoint with the value eg: 09/24/2021

 

Patch(Transactions,

Defaults(Transactions),

{

Title: Gallery1.Selected.Title,

Date: Now()

}

)

 

but what if I want to change the format of the date on how it is patched on SP? If I use Text( Now(),"[$-en-US]dd/mm/yyyy hh:mm"), it gives me an error that this is text while SP waits for date type.

Ideally I would want to store it on SP like DD/MM/YYY hh:mm

 

Any idea? 

Thank you! 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @PerKou,

Have you solved you problem?

Do you want to format your date time as "DD/MM/YYY hh:mm" and save it to your "date & time" column on SharePoint?

Could you please tell me that if your date and time column allows time?

 

1). Make sure that your Date and time column includes time:

vqiaqimsft_0-1632722814651.png

2). Modify your formula as below:

Patch(Transactions,
Defaults(Transactions),
{
Title: Gallery1.Selected.Title,
Date: Now()
}
)

vqiaqimsft_1-1632722922215.png

Check if this could help you at some degree.

Best Regards,
Qi

View solution in original post

3 REPLIES 3
C-Papa
Super User
Super User

Hi , nothing you do it PowerApps will fix this, its the way your SharePoint site is configured. have a look at the below article which should help you out

 

How to change date format in SharePoint - SharePoint Maven

v-qiaqi-msft
Community Support
Community Support

Hi @PerKou,

Have you solved you problem?

Do you want to format your date time as "DD/MM/YYY hh:mm" and save it to your "date & time" column on SharePoint?

Could you please tell me that if your date and time column allows time?

 

1). Make sure that your Date and time column includes time:

vqiaqimsft_0-1632722814651.png

2). Modify your formula as below:

Patch(Transactions,
Defaults(Transactions),
{
Title: Gallery1.Selected.Title,
Date: Now()
}
)

vqiaqimsft_1-1632722922215.png

Check if this could help you at some degree.

Best Regards,
Qi

it helped a lot thanks!

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 (6,058)