Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Incurrentday what don't I understand

I have seen all the issues with UTC time in PowerBI service and read the blogs on pulling data from a web API for timezones and the current time.  That is my issue.  All I need is a function that looks at the current server Date/Time, in my case on-premise Power BI Server or Power BI Desktop, and checks if a date/time column value is today.  True or False response works for me.  

 

This is exactly what the Microsoft Docs says Incurrentday and incurrentweek will do, but after 7PM CST iscurrentday no longer shows dates that are today 8-9-2020 as being in today.  Does that mean the function does not look at the system date but instead UTC.  How can this be when the documentation doesn't come close to stating this.

 

https://docs.microsoft.com/en-us/powerquery-m/date-isincurrentday

About

Indicates whether the given datetime value dateTime occurs during the current day, as determined by the current date and time on the system.

  • dateTime: A date, datetime, or datetimezone value to be evaluated.

 

3 Replies

  • it says "on the system".  This may work for your Power BI desktop, or maybe for Power BI Report server, but for any Power Query code running on the Power BI service this will always mean UTC.

    • Anonymous's avatar
      Anonymous
      Not applicable

      That why I am confused.  I don't use PowerBI service.  Yet it doesn't work right in PowerBI desktop or PowerBI server.  Both systems I am testing on are in Central Standard Time.

      • lbendlin's avatar
        lbendlin
        Super User

        Show your M code for that line. Which date value are you presenting to the function?