cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nmg
Frequent Visitor

Format date to remove time stamp then combine formatted date with time field for 16 SP columns

I have a SP list called "Training Class Details". The list has a date field for the first day of training. The subsequent 15 days of training are calculated date fields based on that first day, excluding weekends. Each date of training also has it's own training start time and training end time (i.e. Day 1 Date, Day 1 Start Time, Day 1 End Time, Day 2 Date, Day 2 Start Time, Day 2 End Time, etc.) I'm using Power Automate to create Outlook events for each of the 16 training dates for each class.

 

I have the flow working but I'm having to format each date column to remove the time stamp then concat the formatted date with the start time, and concat the formatted date with the end time in 3 separate actions in order to pull in the formatted date/time output for each Outlook event.

nmg_0-1629837116205.png

 

I think there may be a more streamlined way to set up my SP columns, but I'm not sure.

nmg_1-1629837180541.png

 

If I keep the SP columns the way they are, is there a way in Power Automate to build an array or do a "for each" loop to format each of the date, start time, and end time columns in one action?

 

Is there also a way to create each of the 16 events in a "for each" action?

 

Thanks for your help!

2 REPLIES 2
PrasadAthalye
Community Champion
Community Champion

You can do a select and format every column like below...

 

PrasadAthalye_0-1629848707496.png

 

concat(string(formatDateTime(item()?['Created'], 'mm/dd/YYYY')), item()?['Time'])
Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
nmg
Frequent Visitor

Thank you. That helps. I also figured out how to add a calculated column on my SP list which combines the Day and time columns into one.

 

Do you know of a way to loop through each training date and create an event for each without having to have a "create event" action for each event?

 

Thanks!

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
Top Kudoed Authors
Users online (4,981)