cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerBINoob24
Helper II
Helper II

Finding difference in minutes between two date/time fields

If got a column that I'm trying to calculate the number of minutes between to date/time fields.  I've currently got 

Time To Access = DATEDIFF('UniqueUsers'[First Access Time],'UniqueUsers'[Send Date].[Day],MINUTE).  The Time to Access Column is formatted at a whole number data type and returns values like -64561883 for a time date that is 19 minutes apart.
 
Any thoughts on what I am doing wrong?
1 ACCEPTED SOLUTION
grandtotal
Resolver III
Resolver III

Make sure that both input columns are in datatime format.
Then try to remove the .[Day] part:

Time To Access = DATEDIFF('UniqueUsers'[First Access Time],'UniqueUsers'[Send Date],MINUTE)

 

View solution in original post

2 REPLIES 2
grandtotal
Resolver III
Resolver III

Make sure that both input columns are in datatime format.
Then try to remove the .[Day] part:

Time To Access = DATEDIFF('UniqueUsers'[First Access Time],'UniqueUsers'[Send Date],MINUTE)

 

That was it....just ahd to remove the .DAY  Thanks!  It's the little things.....

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.