Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Combine date + time & calculate the duration

Hi all,

 

I have 2 question regarding below data

 

1. May I know how do I combine date & time from different column ?

2. How can I calculate the duration of the time in minute?

 

 

Regards,

Nuha

  • Select your date columns and convert the column type to date. Do the same for time columns to convert them into time columns.

    To combine after conversion

    =[Date Column]&[Time Column]

     

    However if don't want to convert the columns, use below formula

    =Date.From([Date Column])&Time.From([Time Column])

     

    If you want to convert Time into hours

    =Number.From([Time Column])*24

    If you hadn't converted column into Time, then

    =Number.From(Time.From([Time Column]))*24

5 Replies

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Icon for Most Valuable Professional rankMost Valuable Professional

    Select your date columns and convert the column type to date. Do the same for time columns to convert them into time columns.

    To combine after conversion

    =[Date Column]&[Time Column]

     

    However if don't want to convert the columns, use below formula

    =Date.From([Date Column])&Time.From([Time Column])

     

    If you want to convert Time into hours

    =Number.From([Time Column])*24

    If you hadn't converted column into Time, then

    =Number.From(Time.From([Time Column]))*24

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Vijay_A_Verma ,

       

      Thanks! Done combine as below. 

       

      How can I calculate the duration between end time to start time in MINUTE?

       

      End Time - Start Time = how many MINUTE

       

       

      Regards,

      Nuha

       

      • Vijay_A_Verma's avatar
        Vijay_A_Verma
        Icon for Most Valuable Professional rankMost Valuable Professional

        = Duration.TotalMinutes([End Time]-[Start Time])