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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps (V2) Trigger...
Power Apps
Answered

PowerApps (V2) Trigger date

(0) ShareShare
ReportReport
Posted on by 173

I have a Power Automate Flow the is Triggered in PowerApps.  I'm trying to pass a date field from a Data Card Value that displays the date as mm/dd/yyyy.  The Trigger Date field is looking for a (YYYY-MM-DD) value, so I'm getting an error.  How do I handle this?  Do I need to covert the format?  How do I convert it back to a date value mm/dd/yyyy so I can use it elsewhere in the flow ( to update file properties, etc.)

Categories:
I have the same question (0)
  • turnerj3 Profile Picture
    2,039 on at

    @remariu ,

    If you are using a date picker in your datacard you can specify the format property. “YYYY-MM-DD”

    Otherwise you can convert it with:

    Text(datacardvalue,“YYYY-MM-DD”)

  • remariu Profile Picture
    173 on at

    I'm sorry, I don't understand.  The date picker datacard is currently set as "DateTimeFormat.ShortDate".  I also have a Default Date set in this field to Today()+365 which reads it as MM-DD-YYYY.   If I change the format, it no longer seems to accept the default date.  And I'm also not clear how to write this back to the Sharepoint List Date column field which also needs a date field as "MM-DD-YYYY".  

     

     

  • turnerj3 Profile Picture
    2,039 on at

    I was able to put this in the datepicker Default.

    Text(Today()+365,"mm/dd/yyyy")

    I was also able to convert the Datepicker to a Label using this.

    Text(DatePicker1.SelectedDate,"dd/mm/yyyy")

  • Verified answer
    remariu Profile Picture
    173 on at

    Thank you very much for the tips, but I'm still getting an error when I try to run the flow.  I have several inputs, and the app worked up until I added the Date Trigger input field.  It says there is a problem with the Flow's trigger.  The input data schema is: 

     

     

    {
    "type": "object",
    "properties": {
    "number": {
    "title": "ID",
    "type": "number",
    "x-ms-dynamically-added": true,
    "description": "Please enter a number",
    "x-ms-content-hint": "NUMBER"
    },
    "text": {
    "title": "Title",
    "type": "string",
    "x-ms-dynamically-added": true,
    "description": "Please enter your input",
    "x-ms-content-hint": "TEXT"
    },
    "text_1": {
    "title": "DocNumber",
    "type": "string",
    "x-ms-dynamically-added": true,
    "description": "Please enter your input",
    "x-ms-content-hint": "TEXT"
    },
    "text_2": {
    "title": "Version",
    "type": "string",
    "x-ms-dynamically-added": true,
    "description": "Please enter your input",
    "x-ms-content-hint": "TEXT"
    },
    "text_3": {
    "title": "User",
    "type": "string",
    "x-ms-dynamically-added": true,
    "description": "Please enter your input",
    "x-ms-content-hint": "TEXT"
    },
    "text_4": {
    "title": "DocType",
    "type": "string",
    "x-ms-dynamically-added": true,
    "description": "Please enter your input",
    "x-ms-content-hint": "TEXT"
    },
    "text_5": {
    "title": "DocSubject",
    "type": "string",
    "x-ms-dynamically-added": true,
    "description": "Please enter your input",
    "x-ms-content-hint": "TEXT"
    },
    "text_6": {
    "title": "Owner",
    "type": "string",
    "x-ms-dynamically-added": true,
    "description": "Please enter your input",
    "x-ms-content-hint": "TEXT"
    },
    "boolean": {
    "title": "ReviewerAccess",
    "type": "boolean",
    "x-ms-dynamically-added": true,
    "description": "Please select yes or no",
    "x-ms-content-hint": "BOOLEAN"
    },
    "boolean_1": {
    "title": "Retired",
    "type": "boolean",
    "x-ms-dynamically-added": true,
    "description": "Please select yes or no",
    "x-ms-content-hint": "BOOLEAN"
    },
    "date": {
    "title": "ReviewByDate",
    "type": "string",
    "format": "date",
    "x-ms-dynamically-added": true,
    "description": "Please enter or select a date (YYYY-MM-DD)",
    "x-ms-content-hint": "DATE"
    }
    },
    "required": [
    "number",
    "text",
    "text_1",
    "text_2",
    "text_3",
    "text_4",
    "text_5",
    "text_6",
    "boolean",
    "boolean_1",
    "date"
    ]
    }
     
    (There are several inputs prior to the date input, but I excluded those as the flow works if I don't include the date trigger.)

    The error just says, "Action 'manual' failed.   and 'Bad Request'
     
    I have inserted a label within the data card set to Text(DataCardValueDate.SelectedDate, "yyyy/mm/dd"). And I point to this label for the Input field.  
     
    Not sure why I'm getting an error.....
  • turnerj3 Profile Picture
    2,039 on at

    I'm not sure on the flow portion. 

  • remariu Profile Picture
    173 on at

    So, with a little trial and error, I was able to get the trigger to read the label with the following:

    Text(DataCardValueNextRevDate.SelectedDate, "[$-en-US]yyyy-mm-dd")

     

    I also included a Compose operation in the flow to convert it back to a date field:

    parseDateTime(triggerBody()['date'],'mm-dd-yyyy')
     
    All seems to be working....thanks for your help!
  • turnerj3 Profile Picture
    2,039 on at

    No problem, I'm glad you understand the flow side!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard