I’d like to format a string (that come from a connector) that looks like string"/Date(1675690009000+0000)/" in this format string"/Date(1675690009000)/" (remove “+0000”).
In fact it should be a date format but the +0000 suffix prevents Tulip to consider it as a date.
To be more precise i dont want to do this treatment in Tulip App but in the connector output (dot notation ?).
Or maybe there is a other way to make Tulip recognize a date ?
Thorsten’s idea is likely a great one! alternatively, you can also use the TEXTTODATETIME() function in the Expression Editor to convert your date string to a DateTime - documentation here: Technical Details of the Expression Editor
Ah, you’re right - in this case, I agree with you - Regex and any necessary JSON-Query are absolutely the way to format a connector output. Unfortunately, I think I also agree with you that it’s pretty hard to get this to come out of the Connector looking exactly as we want. It might be unfortunately necessary to use the Trigger logic, as I don’t think there are any ways to cast output variables formally in Connectors at the moment. On the bright side, using Expressions is relatively low-overhead; I recommend the very first time you wish to interact with this object, doing it in an Expression to avoid unnecessary middle-of-process variables.
Unless there’s ways to add strings in JSON-query - I don’t think it’s doable with regex. However - you could likely snip the /( from the start with lookback/look-ahead arguments? in other words, have the regex specifically return only what is inside the parentheses, etc
Found ! After hours spent…
But just needed to format this : “/Date(1675689790000+0000)/” into this “1675689790000”
And Tulip correctly recognizes it as a date format.