cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rwittels
Resolver I
Resolver I

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)

 

10 REPLIES 10
rwittels
Resolver I
Resolver I

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.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,970)