cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HH84
New Member

Add date range in Forms

I want to add a question to my form where the responder can add a date range. So a "from ... to ...." date.

Is this possible in forms? And preferrably I want the responder to have the option to enter multiple date ranges.

 

And when importing any dates from a Microsoft Form into a Google sheet, how do I get the Google sheet to display 2022-11-29 23:18  instead of 11/29/20222 11:18 PM?

1 ACCEPTED SOLUTION

Accepted Solutions
CFernandes
Super User
Super User

Hey @HH84 

 

formatDateTime(outputs('Compose'), 'M/dd/yyyy h:mm tt')
 

CFernandes_0-1668109391177.png

 

Reference article - https://learn.microsoft.com/en-us/troubleshoot/power-platform/power-automate/how-to-customize-or-for...

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

 

View solution in original post

3 REPLIES 3
CFernandes
Super User
Super User

Hey @HH84 

 

formatDateTime(outputs('Compose'), 'M/dd/yyyy h:mm tt')
 

CFernandes_0-1668109391177.png

 

Reference article - https://learn.microsoft.com/en-us/troubleshoot/power-platform/power-automate/how-to-customize-or-for...

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

 

Hi Clavin,

 

I'm a complete newbie to this, so I'm not sure how to use this. I read the article you referenced to, but to be honest, I don't understand much of it 🙈 so hope you (or anyone else) can help me out here.
Should I add the "Compose" action at this "position" in my flow? (see screenshot below) And then what?

 

In both the Google Sheet (where I want to collect the responses) and the email template (which is under the switch option) I want the form submission date to be shown as YYYY-MM-DD HH:MM:SS (so for example 2022-11-24 17:48:32).
I also have a few questions in my form which ask for a date, and I want those answers in the email and Google Sheet to be displayed as DD MMM YYYY (so "24 Dec 2022") without any time.

HH84_0-1668161747279.png

 

Hope you can help

 

@HH84 Add a "Compose" and then add the function

 

formatDateTime(<add your date variable here>. 'M/dd/yyyy h:mm tt')

 

You can then use the output of the Compose in the "Insert row" action.

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,466)