Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Inquiry about hour calculation

Hi,

I try to extract the hour information from a time field, and I find the result is not always the same as the hour showed in the time data. For example, one is "6/22/2022 10:04:41 PM", the hour should be 22, however when I used hour(time) the result is 21. How to correct this problem? Thanks!

  • this is what i get so think you need to share exactly what you doing 

     

     

6 Replies

  • vanessafvg's avatar
    vanessafvg
    Icon for Community Champion rankCommunity Champion

    can you please share your calculation or demonstrate how you are doing this. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      I used this :   Hour( )

      • vanessafvg's avatar
        vanessafvg
        Icon for Community Champion rankCommunity Champion

        in dax? so you have field that has a date and time and it is a date time type? in it and you create a dax measure / column ?   please share a screenshot of the calc with the result.

         

        calcuation = hour(datetimefield)?

  • vanessafvg's avatar
    vanessafvg
    Icon for Community Champion rankCommunity Champion

    this is what i get so think you need to share exactly what you doing