DATEADD() function would be used to convert UTC to IST in SQL Server.
Below is the sample code for that.
DECLARE @UTCTime As DATETIME;SET @UTCTime = GETUTCDATE();SELECT DATEADD(MI, 330, @UTCTime) AS IST
Happy Coding…
SELECT SWITCHOFFSET(SYSDATETIMEOFFSET(),'+05:30') as [CurrentDateTime]
SELECT SWITCHOFFSET(SYSDATETIMEOFFSET(),'+05:30') as [CurrentDateTime]
ReplyDelete