cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Create an outlook event for a week prior to a date in an excel file.

Hi all,

Cannot figure out how to do this.

I want to set both the start and end date as the start date - 1 week.

Any help would be appreciated.

jcoughlan_0-1592922173279.pngjcoughlan_1-1592922195835.png

 

jcoughlan_2-1592922221185.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
rsaikrishna
Community Champion
Community Champion

@Anonymous 

 

When you read Date values from Excel, they show up as numbers.

 

Follow below instructions:

1. Start Date: Place a compose action after Get Row action. Rename action to "StartDate" To get the date value use the following expression:  

formatDateTime(addDays('1900-01-01',add(int(<Your Field>,-2)),'yyyy-MM-dd')

This will give you the start date.

2. End Date: Place another compose action to calculate End Date after StartDate compose action. Rename the compose action as "EndDate". In this compose action, you can place below expression:

formatDateTime(addDays(outputs('StartDate'),7),'yyyy-MM-dd')

3. In your Create Event action, now you can use both Start Date and End Date values from both the above compose actions.

 

Give a try and post the update here.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

2 REPLIES 2
rsaikrishna
Community Champion
Community Champion

@Anonymous 

 

When you read Date values from Excel, they show up as numbers.

 

Follow below instructions:

1. Start Date: Place a compose action after Get Row action. Rename action to "StartDate" To get the date value use the following expression:  

formatDateTime(addDays('1900-01-01',add(int(<Your Field>,-2)),'yyyy-MM-dd')

This will give you the start date.

2. End Date: Place another compose action to calculate End Date after StartDate compose action. Rename the compose action as "EndDate". In this compose action, you can place below expression:

formatDateTime(addDays(outputs('StartDate'),7),'yyyy-MM-dd')

3. In your Create Event action, now you can use both Start Date and End Date values from both the above compose actions.

 

Give a try and post the update here.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
Anonymous
Not applicable

@rsaikrishna 

I tried inputting the above formula but I am getting an 'expression is invalid' error.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,535)