cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
phearin
Helper III
Helper III

Microsoft Flow syntax

Dear Team,

 

I am new to Microsoft Flow. I want to build Flow to alert by email to respective user by using read information from excel file and validate the condition.

Firstly, I tried to create excel file which contain formular, but it seems Flow doesn't support the link excel file that contains formular. I stopped that way. 

 

Secondly,  I create raw data input with contain date for comparison. However, I tried to use expression to compare my data through condition. I never get clues after applied the expression function. 

 

My question is how can I get date from excel and convert it to INT?

 

Please let me know, if you have any doubts on my question above. 

 

Thanks,

Phearin

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @phearin,

 

There are currently no such third parties that allow us to test, but the usage of many functions is similar to the principles in other languages.

You could refer to the Online doc for more on the usage of Expression:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#functions

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

If your problem has been resolved, please mark it.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Mike_Guzowski
Kudo Kingpin
Kudo Kingpin

Hey,

In terms of date in excel it depends on the exact date format stored in it. 

 

Anyway in Flow condition you can switch to advanced mode where you can write your own expressions (check documentation if needed https://msdn.microsoft.com/en-us/library/mt643789.aspx)

 

The date comparison you can do by following expression @equals('2019-01-24',utcnow('yyyy-MM-dd'))

 

Hi Mike, 

 

Thank for your feedback. 

 

Actually, I want to perform date substraction. However, the date is string, so can we do expression to covert date string to integer? 

 

Ex: Sub('2019-01-10',utcNow('yyyy-mm-dd')) //This is just expression example only, might be it is not correct syntax.

Thanks,

Phearin 

Hi @phearin,

 

First, if the corresponding field is a Date type in the Excel table, it will automatically become the number type in Flow. You can try.

And if the date value you get is in String format and you want to subtract the two dates, you could use the following Expression.

 

div(sub(ticks(utcNow('yyyy-MM-dd')),ticks('2019-01-10')),864000000000)

3.PNG4.PNG

 

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-bacao-msft,

 

Finally, it is working. I have an idea from your clue and apply to my real flow and it return correct value.

Thank again for your support. 

 

One more thing, I just want to know whether Expression which available in Flow has any third parties to test each function before we use it or not? 

 

Thanks,

Phearin 

Hi @phearin,

 

There are currently no such third parties that allow us to test, but the usage of many functions is similar to the principles in other languages.

You could refer to the Online doc for more on the usage of Expression:

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#functions

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

If your problem has been resolved, please mark it.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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 (1,884)