Forum Discussion

Manivannan's avatar
Manivannan
Helper I
9 years ago
Solved

Time Zones

Hi,

 

I have created a measure to display "Time", i need AM/PM also to be displayed along with it.

How to achieve that?

 

 

 

Regards,

Manivannan M

 

  • MarcelBeug's avatar
    MarcelBeug
    9 years ago

    Actually I have litlle knowledge of DAX, and even less of Direct Query, but if your formula works, then I guess this will work as well:

     

    CurrentTime = "Time : " & IF(HOUR(NOW()) < 1,12,if(HOUR(NOW())>12,HOUR(NOW())-12,HOUR(NOW()))) & ":" & MINUTE(NOW()) & ":" & SECOND(NOW()) & IF(HOUR(NOW())<12," AM"," PM")

8 Replies

  • Hi Manivannan,

     

    How your data are stored?

     

    In power query you can use this feature as below.

    I hope it helps otherwise let us know with more examples..

    Thx

    • MarcelBeug's avatar
      MarcelBeug
      Community Champion

      Either =NOW() and format as hh:mm:ss tt

      or = FORMAT(NOW(), "hh:mm:ss AM/PM")

       

      By the way: this is more about time format than time zones, as the subject suggests.

      • Manivannan's avatar
        Manivannan
        Helper I

        Hi MarcelBeug,

         

        Thanks for the reply. I used direct query for this, i guess FORMAT() will not work for direct query.

        Is their any other way to achieve that?

         

         

         

         

    • Manivannan's avatar
      Manivannan
      Helper I

      Hi Interkoubess,

       

      Thanks for the reply.

      I used direct query.