5 Replies Latest reply: Jul 21, 2016 8:05 AM by Sunny Talwar RSS

    Date Range

    naveen kumar

      i had created two variables in variable overview

       

      vMaxdate =Date(Date#('3 Jan' & Year(Date), 'DD MMMyyyy'), 'D MMM')

      vMindate = =Date(Max({Group2}Date),'D MMM')


      expression :i tried two exp

      =sum({<Date={">=$(vMindate)<=$(vMaxdate)"},bid={1},set  = {P}, Type={1}>} value)

      or

      =sum({Group2<Date={">=$(vMindate)<=$(vMaxdate)"},bid={1},set  = {P}, Type={1}>} value)


      if i select 16 Jan from Date field from calendar object whose Alternative State is Group2

      then i can clear can see the below thing is happen

      sum({<Date={">=3 Jan<=16 Jan"},bid={1},set  = {P}, Type={1}>} value)

      which means my variables are carrying correct date values .

      but unfortunately i am getting ZERO as output ,which shouldn't be ...

      so my concert is this a data flow problem ?. I mean is my Date in text format if so how can i make it in to numeric 


      suppose data values are like

      Date

      1 Jan

      2 Jan

      .

      .

      .

      10 Jan

      11 Jan

      .

      .

      20 Jan

      .

      .



      plz any help/.......

      thanks

      naveen

        • Re: Date Range
          Sunny Talwar

          You are right, your date could be text. Why don't you do this kind of transformation in the script for Date field as well?

          Date(Date#('3 Jan' & Year(Today()), 'DD MMMyyyy'), 'D MMM')

           

          or just this:

          Date(Date#('3 Jan', 'D MMM'), 'D MMM')

            • Re: Date Range
              naveen kumar

              HI,

              I got about 14 tabs and i have not clue from where the Date filed is coming ,but i am sure there are multiple Date fields in  script because i can see a key type of icon over Date field ,so what i mean, is there any alternative way to convert Date field in to numeric at frond end