11.02.2021, 19:12 | #1 |
Участник
|
crmtipoftheday: Tip #1401: Round time in Power Automate
Источник: https://crmtipoftheday.com/1401/roun...power-automate
============== Today’s conversation: - Hey, wanna see cool way to round time in Power Automate? - Sure - *shows the trick* - Why it's not a tip yet? - Mmmmm, dunno... True story. Sometimes we need to round time in Power Automate. For example, you want to schedule a meeting for tomorrow, at the same time as now. Except “now” could be 11:28 AM and everyone loves meetings scheduled for random times that do not align on 30 minutes. The trick is to use the simple fact that there is no such thing as date/time data type in Power Automate, it’s all text in a prescribed format. This is the magic expression: concat(substring(utcNow(),0,14),'00:00Z') What does it do? It strips the minutes and seconds portion of the string by selecting just the date part and hours and then adds 00:00 as minutes:seconds (or you can add 30:00 if you want to be fancy). ‘Z’ is for ‘Ze UTC Time’, if you must know. That’s it! Occam’s razor for the win. Источник: https://crmtipoftheday.com/1401/roun...power-automate
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|