NAV DateTime field is showing wrong time in SQL


We are using MS Dynamics NAV 2009 R2 Version NAVIGATOR, US Dynamics NAV 5.0 SP1 (6.00.32012)

The NAV DateTime 14/03/21 03:40:16.213 PM is showing as 2014-03-21 22:40:16.213 in SQL 2008 SP1

Please, help with how I could conver it properly to show the correct time from NAV in SQL that I would use as the date and time for SSRS reporting.



It seems I found a solution calculating a difference between the current and UTC time as below. Please, advise if it could be Ok or there is another proper way of doing it.


DATEADD(millisecond,-DATEDIFF(millisecond, GETDATE(), GETUTCDATE()), ‘2014-03-21 22:40:16.213’


–2014-03-21 15:40:16.213

–14/03/21 03:40:16.213 PM