Skip to main content

Notifications

Power Apps - Microsoft Dataverse
Answered

Struggle to Set Date Only Field in flow for Current Date

(1) ShareShare
ReportReport
Posted on by 9,278

Hi Experts,

 

I struggle with this regularly and happening right now in a flow.  I have a table that has a "Date Only" field in Dataverse called Registration Date.  I am running a flow right now to set this date and it is 8/1/2021 at 8:37 am Central Standard Time.   I have an expression setup to set this date but it is setting to 7/31/2021 vs. 8/1/2021.  

 

convertFromUtc(utcNow(),'Central Standard Time','MM/dd/yyyy')
 
Any idea what I am doing wrong here?  
 
Thanks much,
 
Drew
Categories:
  • Drew Poggemann Profile Picture
    Drew Poggemann 9,278 on at
    Re: Struggle to Set Date Only Field in flow for Current Date

    Hi @ChrisPiasecki ,

     

    That was it, thanks so much!  I modified to 

    convertFromUtc(utcNow(),'Central Standard Time','MM/dd/yyyy hh:mm:ss')
     
    and it worked perfectly.  I even subtracted 13 hours from now to prove it would till work in the formula as a test and it did.  
     
    Thanks,
     
    Drew

     

  • Verified answer
    ChrisPiasecki Profile Picture
    ChrisPiasecki 6,389 on at
    Re: Struggle to Set Date Only Field in flow for Current Date

    Hi @dpoggemann,

     

    Is the Behaviour of the Date column set to User Local? The problem is that in your flow you're not including the time portion in the date formatter. Therefore it will be saved as midnight in UTC, then timezone converted due to the user local behavior setting, making it the previous day.

     

    Try removing the formatter string from the expression so it uses the default "o" format which includes the time. Dataverse will take care of storing it correctly and the client apps will take care of the timezone and displaying correctly. 

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard

Featured topics