2 Replies Latest reply: Feb 2, 2017 9:07 AM by omkar pechetti RSS

    Data Formating

    Christopher Ellis

      I am sure this has probably been asked before.

       

      I have a date file in a csv file that looks like this 02 February 2017 and try as I might I can not format it to do a comparison on todays date.

       

      Should the date and today use the format set in the application to match if the date field = today returning 1.

       

            Match(Date#("Date"),Date#(Today())) As "Active";

       

      Any insight appreciated.

       

      Chris

        • Re: Data Formating
          Vineeth Pujari

          Your date field is text and Date(today()) is num

          So  try below


          Match(DATE(Date#(Date,'DD MMMM YYYY')),Today()) As "Active";

          • Re: Data Formating
            omkar pechetti

            what is assumed is ,you want the date format in today's date format.

             

            if that is the scenario.

            first we have to tell qlikview about how the date format is there for the field.

             

            Ex: 02 February 2017

             

            date#(Datefield,'DD MMM YYYY')

             

            and now we have get desired date format(for suppose your desired format is 'DD-MM-YYYY',27-03-2017)

             

            date(date#(Datefield,'DD MMM YYYY'),'DD-MM-YYYY')

             

            hope i make the point.

             

            please let me know anything you didnt get it