Hi @IH
In SSRS, the now function can return a date value containing the current date and time according to the system. If you want to keep the locale setting, it's as simple as setting the Language expression to =User!Language in the report properties pane.
But using an expression in the report builder to keep the locale setting seems to be difficult to do to display the milliseconds of the date. SSRS does not display the milliseconds of the time by default. If you want to display it, using =FORMAT(NOW(), "MM/dd/yyyy hh:mm:ss.fff tt") seems to be a convenient method, but the time format in the local area will be destroyed.
What I can do is to separate the date from the time, the date is in the regional format, and the time is judged according to the value returned by the now function to determine whether there is "AM", "PM" in it, to choose different formats to display milliseconds.
=FormatDateTime(Now(), DateFormat.ShortDate)&" "&IIF(TimeOfDay().tostring.Contains("PM"),FORMAT(NOW(), "h:mm:ss.fff tt"),
iif(TimeOfDay().tostring.Contains("AM"),FORMAT(NOW(), "h:mm:ss.fff tt"),
FORMAT(NOW(), "HH:mm:ss.fff")))
Preview:
Hope this can help you.
Best regards,
Aniya