cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Learn2Live
Regular Visitor

How to change Date Format

I would like to convert the date value into long date format and i am not sure how to get it done.


Current date value - 2022-10-21,2022-10-24,2022-10-25

Expected date value -
Friday, October 21,2022
Monday, October 24, 2022
Tuesday, October 25, 2022

 

Flow Output details -

ParseJSON & Select action output -
[
{
"Value": "2022-10-21"
},
{
"Value": "2022-10-24"
},
{
"Value": "2022-10-25"
}
]

When i join them using the JOIN expression -
{"Value":"2022-10-21"},{"Value":"2022-10-24"},{"Value":"2022-10-25"}

When i am using the replace expression - my output is
2022-10-21,2022-10-24,2022-10-25

Is it possible to get the long date format Expected value -
Friday, October 21,2022
Monday, October 24, 2022
Tuesday, October 25, 2022

 

And also another issue is when the users select just one day the ParseJSON output ends up like this

 

[
{
"Value": "2022-10-24T06:00:00.000Z"
}

Replace action - output
2022-10-24T06:00:00.000Z

]

 

Need some suggestions on how to get the multi dates and single date to show up in this format
Friday, October 21,2022

 

Learn2Live_0-1666229260216.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SudeepGhatakNZ
Resident Rockstar
Resident Rockstar

@Learn2Live ,

 

Add these actions after your Compose-Replace

SudeepGhatakNZ_0-1666308839857.png

SudeepGhatakNZ_1-1666308865147.png

 

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

View solution in original post

4 REPLIES 4
SudeepGhatakNZ
Resident Rockstar
Resident Rockstar

@Learn2Live ,

use formatDateTime(variable('Date 1'),'ddd, dd MMM yyyy')

 

SudeepGhatakNZ_1-1666233362124.png

 

 

SudeepGhatakNZ_0-1666233281240.png

 

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.
Learn2Live
Regular Visitor

@SudeepGhatakNZ  - Thank you for taking the time to help me out
but this does not work for my scenario

My flow output details -

 

ParseJSON & Select action output -
[
{
"Value": "2022-10-21"
},
{
"Value": "2022-10-24"
},
{
"Value": "2022-10-25"
}
]

When i join them using the JOIN expression - my output is

{"Value":"2022-10-21"},{"Value":"2022-10-24"},{"Value":"2022-10-25"}

When i am using the replace expression - my output is

2022-10-21,2022-10-24,2022-10-25

Now i am trying to convert my replace output to
Friday, October 21,2022
Monday, October 24, 2022
Tuesday, October 25, 2022

 

Not sure if i am doing it right but i am stuck with this.

SudeepGhatakNZ
Resident Rockstar
Resident Rockstar

@Learn2Live ,

 

Add these actions after your Compose-Replace

SudeepGhatakNZ_0-1666308839857.png

SudeepGhatakNZ_1-1666308865147.png

 

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

@SudeepGhatakNZ Thank you so much, It worked as expected. 

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.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,698)