AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
CRM
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 11.02.2021, 19:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
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, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crmtipoftheday: Tip #1397: Reduce extra Power Automate runs and overcome trigger limitations Blog bot Dynamics CRM: Blogs 0 29.01.2021 19:13
crmtipoftheday: Tip #1384: Inline Code in Power Automate Blog bot Dynamics CRM: Blogs 0 23.09.2020 15:11
crmtipoftheday: Tip #1363: Get Environment Variables in Power Automate (and Power Apps) Blog bot Dynamics CRM: Blogs 0 09.06.2020 23:17
crmtipoftheday: Tip #1362: Trigger Power Automate on Associate / Disassociate Blog bot Dynamics CRM: Blogs 0 08.06.2020 14:11
crmtipoftheday: Tip #1359: Whose fault is it in Power Automate? Blog bot Dynamics CRM: Blogs 0 03.06.2020 11:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 17:54.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.