Showing results for 
Search instead for 
Did you mean: 
Advocate III
Advocate III

How to patch Now() to a DateTime field with formatting

Hi. I am trying to patch to a DateTime field in my source. I need to patch Now() with formatting, like this:



DateDeleted: Text(Now(),"[$-en-GB]yyyy/mm/dd hh:mm")



but I get the error "The type of this argument 'DateDeleted' does not match the expected type 'DateTime'. Found type 'Text'."

I understand the issue. I just need to patch Now() as a DateTime format but with "[$-en-GB]yyyy/mm/dd hh:mm".

My problem is that Now() gives me time 2 hours behind the current time. If I use the en-GB format, I get the correct time.
I know I can do this but hopefully there is a way without a workaround:


DateDeleted: DateAdd(Now(),2,Hours)


Advocate III
Advocate III

Here is an interesting observation. I cannot patch to a DateTime field in my source with

Text(Now(),"[$-en-GB]yyyy/mm/dd hh:mm")

but I have a form on another screen which writes the exact same function, in Text format, to another DateTime field in my source without error.

Than you! This one works well!

Helpful resources

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 (5,446)