2 Replies Latest reply: Oct 29, 2015 11:54 PM by jagan mohan rao appala RSS

    Converting date formats to numeric Date "YYYYMM"

    Finn De Wit

      Hi,

      while writing a incremental load (to just load the last month), there were some problems with the date formats of qlikview functions and the database.

      The Date for each set of data is stored in the database as YYYYMM or YYYYMMDD and YYYYMMDD hh:mm.

      The Problem is, that the date functions like now(), today() or date() create values, that are sometimes stored differently than they are formatted in the output (f.e. in tables or textfields)


      LET vMaxDate= date(today()-30,'YYYYMM');

      output= 201507

      stored data = 42290


      when i tryed to limit a load based on a date, the $(vMaxDate) variable showed f.e. 201507, but internally, it was stored as 42290 and didnt match the "DATE" field in the database, which is formatted ('201507').


      How can i convert the output of a date or time function, to show the date as an integer value ?