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

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
Exciting changes

Power BI Community Changes

Check out the changes to the Power BI Community announced at Build.

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Kudo Data Story carousel

Data Stories Gallery

Visit our Data Stories Gallery and give kudos to your favorite Data Stories.

Top Solution Authors