Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
75 stars 81 forks source link

String date transformation, REMOVES '.000Z' from the map #3953

Open wiktorklusek opened 9 months ago

wiktorklusek commented 9 months ago

Describe the Bug with repro steps

  1. After adding source and destination schemas which all contains String
  2. Drag and drop startDate to Date
  3. maps after testiing removes .000Z from the date, which is required by the program we are using
  4. "eventTime": "2023-12-19T00:00:00.000Z", gets transofmred to '2024-01-31T00:00:00Z'

What type of Logic App Is this happening in?

Standard (VSCode)

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

No response

Screenshots or Videos

No response

Browser

Edge

Additional context

No response

DanielleCogs commented 9 months ago

Hi @wiktorklusek I am trying to reproduce your issue but am not sure I understand the inputs and the functions you are using. Could you upload a screenshot of your map and the test data you are using? The schemas and LML documents would also be helpful!

github-actions[bot] commented 8 months ago

We requested more information to triage this issue. If the issue goes more than 7 days with no more information it'll be automatically closed.

wiktorklusek commented 8 months ago

Hi there!

So that's the thing, I am not using any functions, just trying to get String, in date format and map it to another string. This actions for some reasons removes the last set of 0's and the dot.

Direct mapping: "endDate": "2023-12-31T00:00:00.000Z", gets transformed into: "endDate": "2023-12-31T00:00:00Z",

image

wiktorklusek commented 8 months ago

image

image

wiktorklusek commented 8 months ago

So if you will use the same format for the date, create two new schemas , and map them directly, '.000Z' will get removed. Like there was some kind of a logic in the background responsible for it.

Let me know if there is anything else that I can assist here. Thanks in advance

DanielleCogs commented 8 months ago

thanks @wiktorklusek for the details! I was able to reproduce this from the frontend side.

@pariksg I inspected the network calls and as far as I can tell we are sending the ".000Z" and getting ".00Z" back. I tried testing with a string ending in ".0000Z" and still got ".00Z". I removed the "T" from the string, sending "2023-12-1900:00:00.0000Z" and actually got the correct string back. This makes me think it has something to do with the datetime type being inferred from the format. Lmk your thoughts.

DanielleCogs commented 8 months ago

Internal work item here https://msazure.visualstudio.com/One/_workitems/edit/26472125

wiktorklusek commented 8 months ago

Hi!

Can you let me know how to access the above URL as it does not loads, Thanks in advance!