4 Replies Latest reply: Jul 16, 2012 3:07 PM by samarth.shah RSS

    Creating a string variable for today's date

      I would like to query a postgres database to load a table. I need to make the query dinamic. For Example, a simple query would look like this:

      SELECT *

      FROM  table1

      WHERE date(reportdate) = '2012-07-16'

       

      I want to feed the date  '2012-07-16' in WHERE statement above using today() function in the qlikview. So I need to convert the result of the Today() function in a string which looks like  '2012-07-16'.  so that i can write above query as:

      SELECT *

      FROM  table1

      WHERE date(reportdate) = $(vdate)

       

      in this query $(vdate) should produce '2012-07-16'. How can i do that?