TimeStamp - culture support - powershell
AnsweredHi
I just noticed that Culture support doesn't work with date time. I have a PowerShell script that needs to use Time Stamp in a specified format (danish in this case), however when I add it with culture support it only outputs date without time and in a US format (mm-dd-yyyy). See the screenshots below.


It works if I create a variable with the ""[?Culture([*DATETIME_STAMP],"DAN")]"" and then use that variable, however I have some scripts that uses the date directly in the Power Shell action.
This is on: 15.0.1, not sure if it was the same on the previous version of Foxtrot.
-
Hi Tatyana,
But it works fine in some other action. I have just now tried to create message action and use [?Culture([*DATETIME_STAMP],"DAN")] as a message and it showed up without issues.
It seems to be malfunctioning only in PowerShell action, which is very strange. In addition it has been working fine until today, but I don't know if it was because the day number was higher than month number or because I was on the previous version of Foxtrot.


-
Hi Andrius,
We have received a response from the developers on this question:
“This issue is not just affecting the culture formula but all formulas because they are quote wrapping the formula. It is probably needed for the PowerShell to behave correctly but quote wrapping a formula will ALWAYS give you wonky results. There is only one way that we can fix this issue and that is to completely rework the token engine. In the meantime please follow Tatyana's advice of using the formulas to variables and place the variables in the PowerShell script. That will work as expected.”
This is the solutiom for now until they rework the token engine.
Please sign in to leave a comment.


Comments
7 comments