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

Create Event (V4) start date expression- Need same time each day and if time has passed, set date to tomorrow

I am having an issue with making a simple expression for start date in Create Event (V4).

 

This automation creates a calendar event when a new To Do is created. The event start and end is unrelated to the the To Do information. I want the start date to be Today at noon. If noon has passed, set date to next work day M-F at noon. I attempted If(utcnow().... but without previews of the return information, it would take me years. 

 

Since Create Event V4 has a timezone selection, I don't think it's needed, but just in case, I am Eastern Standard Time (utc-5).

 

Logic behind this ask: For each new event, I need to schedule it on my calendar to block out the time. Having the event automatically show at noon allows me to drag and drop it, extend it, decrease the time, etc for when needed. 

 

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @ACSchnitzer 

 

I have this working, follow this:

Notice the purple highlight I have Universal Time. And

In the cyan/blue highlight I have my Time zone (change to yours)

 

In the format string drop down select 'Enter custom value' and than put

hh:mm:ss

 

Jcook_0-1597851971372.png

 

Here is a Successful run:

 

Jcook_2-1597852274504.png

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

4 REPLIES 4
Jcook
Super User
Super User

Hello @ACSchnitzer 

 

Where is the Date and time for the event coming from, and what does it look like?


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





@Jcook - I am not passing through a date or time. I am using the expression UTCnow() and converting it to eastern standard time. 

 

I think the better way of accomplishing this is in a condition statement. but now I am running into formatting issues when it runs. 

 

'convertFromUtc(utcNow(),'Eastern Standard Time','HHmmss')' Is Less Than '120000'
 
When this flow runs, I want it to create an event for today if the above statement is true. If it is false, I want it to create an event for tomorrow.

Also- When I change the condition to Less than, it works. When I change it to Greater than, it fails saying I am using a "Float" value. Why would it work for less than if it's incorrect?

Hi @ACSchnitzer 

 

I have this working, follow this:

Notice the purple highlight I have Universal Time. And

In the cyan/blue highlight I have my Time zone (change to yours)

 

In the format string drop down select 'Enter custom value' and than put

hh:mm:ss

 

Jcook_0-1597851971372.png

 

Here is a Successful run:

 

Jcook_2-1597852274504.png

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,734)