Date and Time diaplayed in the reports needs to match with client time zone

Answered Date and Time diaplayed in the reports needs to match with client time zone

  • Monday, January 21, 2013 11:15 AM
     
     

    Hello,

     I am using ssrs reports and displaying some dates and time information.

    when i run a report in server machine where reporting services are running, i get the date and time getting displyed in the Time zone of that server machine.

    But, when i run a report in a machine other than the server where the reporting services are running (a client machine) and check for the time related information it is displayed in the Time zone of the server machine only, whereas the date and time information should be displaying in the client machine time zone only.

    I am using the below expression to convert to local Time zone.

    Timezone.CurrentTimeZone.ToLocalTime()<//span>

    <//span>

    I tried to understand the issue with this and found that the SSRS expressions are executed in the server where the reporting services are running and hence the above expression is taking the time zone of the server machine.

    Can you help me and suggest  a way to display the date and time related information getting displayed based on the time zone of the client machine or the machine where i am generating the report.

    Thanks,

    Gokul

All Replies

  • Monday, January 21, 2013 11:57 AM
     
     
    http://msdn.microsoft.com/en-us/library/bb677244.aspx

    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Blog: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance

  • Monday, January 21, 2013 12:49 PM
     
     
    You can specify the format to the date columns to which your client follows.

    Thanks -NK

  • Monday, January 21, 2013 1:19 PM
     
     Answered

    hi, 

    you can try this, build a table with the user ids and their difference in time in relation to the server, so you have two columns.

    Then create a dynamic dataset using an expression ="select time_difference from timetable where user_id='" & User!UserID & "'"

    You can use this to initialize a hidden parameter. Once you get the time difference, you do the math on the current time stamp to calc the new time stamp and display it instead.  Since you may have several checks If End If checking time whether morning or night and when you need to adjust or move forward a date, it might be easier to write a custom code and pass the current server time and the time difference and return the calculated date/time stamp.


    Please mark as answered or vote helpful if this post help resolved your issue. Thanks!

    k r o o t z