How to cast DATETIME from UTC to GMT Standard Time on Azure Steam Analytics query?

Vivek Komarla Bhaskar 911 Reputation points

I'm trying to use the below function in an Azure Stream Analytics query to convert DATETIME values from UTC to the London timezone. However, this doesn't work on Azure Stream Analytics, however, it does on Azure dedicated SQL pools.

Works on Synapse Dedicated Pool:

Screenshot 2023-05-15 at 11.15.44 am

Doesn't work on Azure Stream Analytics:

Screenshot 2023-05-15 at 11.18.09 am

Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
342 questions
{count} vote

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA-MSFT 84,936 Reputation points Microsoft Employee

    @Vivek Komarla Bhaskar - Thanks for the question and using MS Q&A platform.

    All time handling operations in Azure Stream Analytics are in UTC - Time Management (Azure Stream Analytics). It is recommended that timestamps are in UTC time zone and in ISO 8601 format. Time zone conversion is only possible through JavaScript user-defined functions in Azure Stream Analytics.

    Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.