3 Replies Latest reply on Jul 26, 2016 7:10 AM by sreekanth kancharla

    Calculate Difference in Years, Months and Days between Two Dates

    sreekanth kancharla

      Hi All,

       

      I am new to the Tableau.

      I having table in a  database.

      Table Name: Workdetails.

         

      WorkIdStart DateEnd Date
      11/1/20151/2/2015
      21/1/20151/5/2015
      31/1/20152/3/2015
      41/2/20151/10/2015
      52/10/20154/10/2015
      62/12/20153/5/2015
      73/31/20154/1/2015
      812/30/201512/31/2015
      912/31/20151/2/2016
      1012/31/20152/10/2016

       

      I am try to generating the report in below

        

      WorkIdStart DateEnd DateDuration

       

      The Duration having the format : years Months Days

       

      As like the below table

       

          

      WorkIdStart DateEnd DateDuration
      11/1/20151/2/20150  Years  0 Months 1 Days
      21/1/20151/5/20150  Years  0 Months 4 Days
      31/1/20152/3/20150  Years  1 Months 2 Days
      41/2/20151/10/20150  Years  0 Months 8 Days
      52/10/20154/10/20150  Years  2 Months 0 Days
      62/12/20153/5/20150  Years  0 Months 21 Days
      73/31/20154/1/20150  Years  0 Months 1 Days
      812/30/201512/31/20150  Years  0 Months 1 Days
      912/31/20151/2/20160  Years  0 Months 2 Days
      1012/31/20152/10/20160  Years  1 Months 10 Days
      111/1/201510/5/20161  Years  9 Months 4 Days

       

       

      How to generate the Tableau report in the above formate .

       

      Thanks