great77
great77

Reputation: 143

SSRS Expression Conversion to UTC

I have tried my best to convert one textbox to UTC using the SSRS expression. It is not converting it. Is there any settings to configure before this code can work ? i used these two code below. Nothing works!

=TimezoneInfo.ConvertTimetoUtc(CDate(Fields!Starttime.Value))    

=DateTime.SpecifyKind(Fields!Starttime.Value, DateTimeKind.UTC)

Upvotes: 0

Views: 2339

Answers (1)

niktrs
niktrs

Reputation: 10066

Use the expression below

=Fields!Starttime.Value.ToUniversalTime()

Design & Result with sample data

enter image description here

enter image description here

Upvotes: 1

Related Questions