Rithik_Prem
2 years agoNew Contributor III
How to Display User Specific Time in Excel Header using Dashboard XFBR String
Hi,
We are trying to Display User Time when we export the report to excel on Excel Header. We tried using this code, but it is giving us the UTC Time.
If args.FunctionName.XFEqualsIgnoreCase("DateandTime") Then
Dim localTime As DateTime = DateTime.UtcNow
Dim timeZone As TimeZone = TimeZone.CurrentTimeZone
localTime = timeZone.ToLocalTime(localTime)
Dim formattedTime As String = localTime.ToString("yyyy-MM-dd HH:mm:ss")
Return formattedTime
End If
Is there any way to display the User specific Time?
Thank you