Hi,
I am recieving a javascript date (SendDate) object in below json response in the middle of a flow.
{ "Code": 1, "Message": "Executed successfully", "Result": [ { "FilterId": 0, "FilterName": "No filter used", "FromEmail": "emailaddress", "FromName": "Name", "MailinglistId": [ 3623322857 ], "MailinglistName": [ "Just a name" ], "NewsletterId": 5726778, "NewsletterName": "Just a name", "NewsletterSubject": "", "SendDate": "/Date(1568020620000+0200)/", "SendQueueId": 2482323282, "StatusCode": 2, "StatusMessage": "Sent" } ] }
Later in that flow a want to create a record in Dynamics CRM with that date in a date only field, so I need to convert
/Date(1568020620000+0200)/ to a timestamp with format 'yyyy-MM-dd'
How can I achieve this, really appreciate some help 🙂
Thanks
//S
Solved! Go to Solution.
Hi @swaseb
This is what you need to do.
To convert the date I referenced this link
The first compose expression is as follows:
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogHi @swaseb
This is what you need to do.
To convert the date I referenced this link
The first compose expression is as follows:
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogTake a look at the formatDateTime() expression . You can use it to convert any valid date/time to a yyyy-MM-dd format or any other date/time format.
Thanks @abm ,
Worked like a charm, though I had to "int" the second expression and use "+" as splitter to get rid of the figures after the plus sign as the flow did not think it was a valid date string.
Hi @swaseb
Glad to hear that it is working. I have edited my earlier reply by remvoing the hardcoded expression date function.
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blogLearn to digitize and optimize business processes and connect all your applications to share data in real time.
Read the latest about new experiences and capabilities in the Power Automate product blog.
User | Count |
---|---|
26 | |
25 | |
25 | |
20 | |
15 |
User | Count |
---|---|
54 | |
46 | |
33 | |
32 | |
30 |