Open sridharvenkat opened 3 years ago
@rahulamlekar Can you confirm whether milliseconds is supported by the version of the RFC 3339 (which we are documented to support)?
Since there is inconsistent behavior we'll need to follow up and fix one or the other.
looks like fractional seconds are part of RFC3339 (see time-fraction
)
Thanks for investigating this, I couldn't find a workaround other than string manipulation (removing the fractional seconds). Any better suggestions?
Do you have any plans to fix that or at least provide a workaround?
I now use {{DATE(${formatDateTime(duedate,'yyyy-MM-ddTHH:mm:ssZ')})}}
as a workaround to remove the milliseconds
Target Platforms
NodeJS
SDK Version
1.3
Application Name
Microsoft Search results - https://docs.microsoft.com/en-us/microsoftsearch/customize-results-layout
Problem Description
DATE() and TIME() doesn't accept milliseconds in the date string. Though millisec based date string is parsed perfectly in JS and in .NET
E.g Data - "departureTime": "2021-09-07T19:28:09.7315703+00:00", Format - "text": "{{TIME(${string(reservationFor.departureTime)})}}", Result - {{TIME(2021-09-07T19:28:09.7315703+00:00)}}
Without the milliseconds in the string it works correctly.
E.g. Data - "arrivalTime": "2021-09-07T19:28:09+00:00", Format - "text": "{{TIME(${string(reservationFor.arrivalTime)})}}", Result - 12:28 PM
E.g. Data - "createdUtc": "2021-07-28T09:17:57.234Z", Format - "text": "{{TIME(${string(reservationFor.arrivalTime)})}}", Result - {{TIME(2021-07-28T09:17:57.234Z)}}
Without the milliseconds in the string it works correctly.
E.g. Data - "createdUtc": "2021-07-28T09:17:57Z", Format - "text": "{{TIME(${string(reservationFor.arrivalTime)})}}", Result - 2:17 AM
Screenshots
Card JSON
SAMPLE DATA JSON
Sample Code Language
No response
Sample Code
Used adaptive card designer - https://adaptivecards.io/designer