I am trying to create a timestamp including milliseconds in BluePrism using a Calculation step with the following expression:
FormatDateTime(Now(), "yyyy_MM_dd_hh_mm_ss_fff")
According to the BluePrism documentation, Now() returns current date and time and FormatDateTime uses DotNet format strings. According to the Dot.Net documentation it should work with fff. Unfortunately I only get 000 at the end, which is unlikely to be correct considering the number of attempts I already made. What should the format string be so that the milliseconds are part of the result? PS: FFF instead of fff does not work either. Thanks a lot!
The solution is using a Code step. You can use the same procedure as in .Net in a Code step:
timeStamp = DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss_fff")
A native Calculation step in Blue Prism that includes the expression from the question will definitely not return milliseconds, although it should. (This appears to be an issue in BluePrism.)
In Object Studio after runing the page once, including the solution at Code1, an alternative solution at Code2 and the expression from the question at Calc1, it looks like this: