2 Replies Latest reply on Jun 2, 2015 7:08 AM by Cyril Belmehdi

    Tableau 8 : DD/MM/YYYY h:m:s  Date conversion

    Cyril Belmehdi

      Hi ladies and gentlemen


      First, I'm forced to use Tableau 8 and I know why it's not interpreted correctly by Tableau 8 and that it's fixed by 9


      But still, I have a DD/MM/YYYY h:m:s I'm willing to convert but I can't get why it's not working


      my date is a 1/1/2016 00:00:00 format (1 jan 2016)


      So I tried to force my Periode to String and then create a date as :


      DATEPARSE("DD/MM/YYYY h:m:s", [Periode])


      But it's not working. I suspect it's because the DD and the MM are only a 1 length field if it's <10 but maybe someone has something to fix it.


      I could do it using the find string and padding with 0 when it's <10 but isn't there a quicker way ?


      I'm worried my client will freak out when he'll see what I need to do to have the right interpretation




      ps : this time answers such as you're dreaming are not accepted Jonathan Drummey

        • 1. Re: Tableau 8 : DD/MM/YYYY h:m:s  Date conversion



          I think just date([Periode]) should do what you are seeking:




          To get the time on the view, you will need to change the default setting of the calc to display hh:mm:ss

          • 2. Re: Tableau 8 : DD/MM/YYYY h:m:s  Date conversion
            Cyril Belmehdi

            Well, thanks, it looks much easier than :


            DATEPARSE("DD/MM/YYYY h:m:s",


            RIGHT("0" + MID([Periode],1, FIND( [Periode],"/" )-1),2)


            RIGHT("0" + MID(MID([Periode],FIND( [Periode],"/" )+1),1, FIND(MID([Periode],FIND( [Periode],"/" )+1),"/")-1),2)



            + " "

            + RIGHT([Periode],8)





            But I'm kind of confused here since my simple DATE (of my forced string) function is working but not the simple source data interpretation.


            Thanks anyway, it works, I'll leave with this mysterious way of interpretating date afterward instead of directly at import