3 Replies Latest reply: Apr 29, 2011 3:13 PM by Johan Adolfsson RSS

    Time format

    Johan Adolfsson

      Hi,

      I ran into a strange time format in one of the files I am loading. I can't get Qlikview to recognize it.

      0,000243056

      I can get Excel to format it correctly. According to Excel "00:00:21".

      Does anyone know how to format/convert it in Qlikview?

      Thanks,
      Johan

        • Time format
          Erich Shiino

          All dates and timestamps in QlikView and Excel are just numbers.

          What you see is just a mask that format numbers into days, hours, etc.

          1 unit = 1 day, 1 hour = 1 /24 , 1 second = 1 / 24/3600 and so on.

          to apply the timestamp mask back again, use this:

          timestamp( yourFieldHere,'hh:mm:ss'')

          you can replace the field by anything else (e.g. an expression) to work with charts.

          You can check the article about timestamp on the help to get more details.

          Rgds,

           

          • Time format

            Hi

            use time(Field) and it will return "00:00:21", if you have your timeformat variable with hh:mm:ss

            Rgds

            Ps. be carefull with the ',', because the decimal separator must be '.'

              • Time format
                Johan Adolfsson

                Thank you so much Hector! I'd kiss you if I could. SmileSmile
                I have been pulling my hair out over this. I was using the time() function...but you pointed one thing out to me the
                importance of the separator being '.' and not ','. In my file it is ...guess what...yup... ',' . I just used Replace()....and it worked.
                Time(Replace(Field, ',', '.'), 'hh:mm:ss')

                Thanks again