I'm currently added a text box to my report in which I'd like to add an expression that will do one of two things (either is fine for my purposes).
Either A. Display the local time of the user who ran the report in the text box. B. Display the Eastern Standard Time of when the report was ran.
No matter what I do, the expression only displays the time the report was run in zulu (the server time of SSRS), even if I'm looking at SSRS on the web side signed in from my time zone.
I've tried the following:
=Now()
(displays Server datetime)
=Today()
(displays server date at 12AM still in zulu)
=formatdatetime(today)
(displays only server date, still in zulu)
=System.TimeZone.CurrentTimeZone.ToLocalTime(Fields!DateTime.Value)
(This says my report is invalid. I says my text box refers to 'datetime', and "Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope.)
=Code.FromUTC(Fields!UTCDateFromDatabase.Value, Parameters!TimeZone.Value)
(same issue as above, except it says my test box is referring to 'UTCDateFromDatabase'. Not sure if I'm missing something from that person's post. They had a Similar Question )
I found one other examples that didn't work that I unfortunately can't find again right now. One which did the same thing as above, only displaying the server datetime (there was mention of 'UTC' in the code).
I can't find anything for how to convert simply to a timezone, and anything that claims to pick up the end user's time zone doesn't seem to work.
Any assistance would be great.