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

Using dates

I have created  aflow that gets items from a sharepoint list.  This then goes to a condition that:

 

If record is before today it creates a new item in another list.  It then deletes that item from the item list. 

 

It worked with the exception it did select the group based on date I wanted.  It selected a whole group of future dates.

 

I used utcNow() < date   where date is in the SP date column.  I hav enever worked with UTC befoe and assume I need to do someting with that to make sure.  date is a simple date, not date/time

1 ACCEPTED SOLUTION

Accepted Solutions

hi @leyburn19

 

You can retrieve all items by changing the limit using settings for Get Items template.

 

Thanks,

Sru

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @ leyburn19,

 

Could you please share a screenshot of the configuration of your flow?

 

I have made a test on my side,I have create a sharepoint list with a "Start Date" column with "Date" type.

 

You could create the flow refer to screenshot below:

Capture.PNG

 

The expression in the condition as below:

@less(formatDateTime(items('Apply_to_each')?['Start_x0020_Date'], 'yyyy-MM-dd'), formatDateTime(utcNow(), 'yyyy-MM-dd'))

 

The flow would run successfully, and the items which's "Start Date" is less than today would be deleted,and a new item would be created in another list as below:

Capture.PNG

The items which's "Start Date" isn't less than today would do nothing as below:

Capture.PNG

 

 

Regards,
Alice Zhang

Thank you for teh response.  I actually found that I could filter the list at the Get Items stage with Odat filter.  Once I worked out how to look at that with utcNow() it fell into place. 

 

Another anomoly came fromn it though.  When I ran the flow I expected it do about 2500 records.  It only did 200.  Is there a flow limit in place for this type of action?  What I did was get all items before today and basically create a copy in another list

hi @leyburn19

 

You can retrieve all items by changing the limit using settings for Get Items template.

 

Thanks,

Sru

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (82,014)