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 Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,970)