Forum Discussion
Getting Time Difference
- 1 year ago
Hi ranz_vincent - You can create new columns to combine the dispatch date with dispatch time and arrival date with arrival time.
DispatchDateTime =
'Table'[dispatch_date] + 'Table'[dispatch_time]Combine Arrival Date and Time
ArrivalDateTime =
'Table'[arrival_date] + 'Table'[arrival_time]Once you have the DispatchDateTime and ArrivalDateTime columns, you can calculate the duration between them
Duration =
DATEDIFF('Table'[DispatchDateTime], 'Table'[ArrivalDateTime], MINUTE)This formula calculates the duration in minutes. You can replace MINUTE with SECOND, HOUR, or DAY depending on your preferred unit of time.
Hope this helps.
- Anonymous1 year ago
Hi ranz_vincent ,
Thanks rajendraongole1 for the quick reply and solution. In addition to creating calculated columns in Desktop, you can also create new columns in Power query.
(1)Add column->merge column.
(2) Change column type.
(3) Add a custom column.
If you need minutes, use it:
Duration.TotalMinutes([arrival]-[dispatch])Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ranz_vincent ,
Thanks rajendraongole1 for the quick reply and solution. In addition to creating calculated columns in Desktop, you can also create new columns in Power query.
(1)Add column->merge column.
(2) Change column type.
(3) Add a custom column.
If you need minutes, use it:
Duration.TotalMinutes([arrival]-[dispatch])
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ranz_vincent1 year agoHelper I
Sorry I got side tracked from other tasks but thanks a lot for this i tried both suggestions and they worked great so thanks again.