2 Replies Latest reply: Oct 29, 2018 5:57 AM by Ruben Marin RSS

    Date Formate Issue

    vikram dumala

      Hi,

       

      Can any one slve this issue is, In my DB date formate looks like 201808010045, and i have converted into Date formate using qliksense date functions Date(Date#(Date_Field,'DD/MM/YYYY'),'DD/MM/YYYY')  but it rutunes like 06/10/552533464 vaue.

       

      Please help in solving this.

       

       

      Thanks,

      Vikram.D

        • Re: Date Formate Issue
          Ruben Marin

          Hi, Vikram, try with:

          =Date(Date#(Date_Field, 'YYYYMMDDhhmm'))

           

          or to keep only the date (not the time):

          - Floor(Date(Date#(Date_Field, 'YYYYMMDDhhmm')))

          - Date(Date#(Left(Date_Field,8), 'YYYYMMDD'))

            • Re: Date Formate Issue
              vikram dumala

              HI Ruben Marin,

               

               

              Thanks, It's working fine.

              Still i have a doubt, i removed the  time string from Set variables, i have applied the

              Date(Date#(Date_Coulmn),'DD/MM/YYYY'),'DD/MM/YYYY') even it deos returned the Same Issue.

               

              May i know why.

               

               

              Thanks,

              Vikram

                • Re: Date Formate Issue
                  Ruben Marin

                  Hi, removing the time part from set variables doesn't change the values loaded in fields, it can change how values are readed and how they are shown, but doesn't change field values (internally they kept the same numeric value).

                   

                  You have to remove it from the field when loading data:

                  - Date(Date#(Left(Date_Field,8), 'YYYYMMDD'))


                  or: Floor(Date(Date#(Date_Field, 'YYYYMMDDhhmm')))

              • Re: Date Formate Issue
                Ivan Bozov

                Try this as your date field is actually a timestamp:

                 

                Timestamp(Timestamp#(Date_Field, 'YYYYMMDDhhmm'), 'DD.MM.YYYY') AS Date_Field