web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : uF79aj6Uus+1gzC1MDKCuw
Power Automate - Building Flows
Answered

FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

Like (0) ShareShare
ReportReport
Posted on 7 Jun 2023 13:05:59 by 40

Hi All.

I am creating individual reminder summary email from Devops through powerautomate and would like to format 

Microsoft.VSTS.Scheduling.TargetDate ("Target Date") in Select data operation in flow but formatDatetime not showing to select target date. Could you please help me to fix this.

 

GaneshKothakota_0-1686089473958.png

GaneshKothakota_0-1686143073455.png

 

 

I have the same question (0)
  • GaneshKothakota Profile Picture
    40 on 08 Jun 2023 at 15:55:16
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    @annetoal  Finally it works with Select operations as below. Initally build select operation with get query results value then i have updated body with filter array. it worked.

    Thanks for your support and i am accepting your solution.

    GaneshKothakota_0-1686239711194.png

     

  • annetoal Profile Picture
    1,934 Moderator on 07 Jun 2023 at 19:53:42
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    Are you saying that the expression 

    formatDateTime(item()?['Microsoft.VSTS....],'MM/dd/yyyy')

    produces an error when you enter it into a Compose? Could you please show the output of the expression in the error? Also, it would be helpful to show the outputs of the error run.

  • GaneshKothakota Profile Picture
    40 on 07 Jun 2023 at 17:28:44
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    @annetoal  I have tried as below but still getting error shown

    GaneshKothakota_0-1686158842772.png

    GaneshKothakota_1-1686158896144.png

     

    GaneshKothakota_2-1686158915983.png

     

  • annetoal Profile Picture
    1,934 Moderator on 07 Jun 2023 at 16:01:38
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    The empty expression is wrong the way you have it. Take a look at Solved: Flow Condition If Field is Blank - Power Platform Community (microsoft.com) to learn about what might be a better approach.

  • GaneshKothakota Profile Picture
    40 on 07 Jun 2023 at 15:53:23
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    I am trying with below compose but its not accepting formula/code. This is my first flow and i am not that good in flow

    GaneshKothakota_0-1686153192491.png

     

  • annetoal Profile Picture
    1,934 Moderator on 07 Jun 2023 at 15:43:54
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    Don't use Filter; use a condition to handle the Nulls.

    The Compose action is just to show you the value of that expression on each loop through the Apply to each. It's just there for your diagnostic purposes. You can delete it when it stops being useful to you.

  • GaneshKothakota Profile Picture
    40 on 07 Jun 2023 at 15:39:32
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    @annetoal , if i use filter then summary email will omit those blank target rows. I would like to send along with it even if records has target date blank. Could you please guide me .

    I used compose operation but still giving error due to null values

  • Verified answer
    annetoal Profile Picture
    1,934 Moderator on 07 Jun 2023 at 15:26:22
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    Get rid of the Nulls:

    1. Manually edit them out 

    2. Configure your source so that it is not possible for it to generate a Null

    3. Put a filtering module in Power Automate to catch the Nulls in each item() before they get to your evaluation step

     

  • GaneshKothakota Profile Picture
    40 on 07 Jun 2023 at 15:21:21
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    Hi @annetoal , Thank you

    yes some of records  target dates are null so how to handle the error. Meanwhile I will try compose

  • annetoal Profile Picture
    1,934 Moderator on 07 Jun 2023 at 15:18:24
    Re: FormatDateTime Microsoft.VSTS.Scheduling.TargetDate from Azure Devops

    Put a Compose action between the Filter array and the Select Mapped Columns. Enter an expression in Compose containing the formula in question 

    formatDateTime(item()?['Microsoft.VSTS.Scheduling.TargetDate'],'mm/dd/yyyy')

    Question: does Microsoft.VSTS.Scheduling.TargetDate have a value?

    The error message is showing it is 'Null' instead of the date string you want. Experiment with the output of your expression and use the output from the Compose action to show your results.  Once you rid of the Null value, the error should go away.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 798 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 469 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 333

Last 30 days Overall leaderboard