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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 04.07.2019, 11:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
dynamicsnavax: Business Events and Date format in Flow
Источник: http://dynamicsnavax.blogspot.com/20...t-in-flow.html
==============

Business Events formats Dates in the Microsoft JSON format, e.g. "EventTime": "/Date(1560839609000)/"
I wish it was in ISO8601 standard e.g. "2019-06-18T05:40Z".


Below is what I did using Flow.

First get the integer part of the string by using the replace function.
Function: int(replace(replace('/Date(1560839609000)/','/Date(',''), ')/', ''))
Output: 1560839609000

To format into date.
Function: addseconds('1970-1-1', Div(1560839609000,1000) , 'yyyy-MM-dd')
Output: 2019-06-18

To format into datetime.
Function: addseconds('1970-1-1', Div(1560839609000,1000) , 'yyyy-MM-dd hh:mm:ss')
Output: 2019-06-18 06:33:29

Using an online converter I am able to validate my output.
https://www.epochconverter.com/


After that, you can use the Date Time string to or formatDateTime function.



For the developers out there. Newtonsoft is great for working with dates and supports both formats. Have a look at this link for a bit more info.
https://www.newtonsoft.com/json/help...atesInJSON.htm

If you have a better way of handling dates. Please let me know.


Источник: http://dynamicsnavax.blogspot.com/20...t-in-flow.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
sertandev: How to integrate D365FO with Microsoft Flow using the new Business Events Blog bot DAX Blogs 0 23.05.2019 16:11
waldo: Microsoft Dynamics 365 Business Central – 2019 Spring Release Blog bot NAV: Blogs 0 02.04.2019 09:11
CRM DE LA CREME! Some more useful javascripts for MS CRM Blog bot Dynamics CRM: Blogs 0 04.05.2010 11:05
wiki.dynamicsbook: Changes Made in Navision Attain 3.60 Blog bot Dynamics CRM: Blogs 0 02.09.2008 13:23
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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