Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
srinivasa1
Creator II
Creator II

date

we need to from todays date generetaet 12 month date and year .pls help me

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   add this.

   'Q' & Ceil(Month(Date)/3) & '/' & Year(Date) AS Qurter

  

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

7 Replies
srinivasa1
Creator II
Creator II
Author

we need to from todays date need generetaet last 12 month date and year .pls help me

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Do you mean you want to create a master calander from last 12 months till now.?

   If yes then try following code.

   Let vMin = num(Makedate(2011,01,01));

   Let vMax = num(today());

   Temp:

    Load

      Date($(vMin) + Iterno() -1) as Date

    Autogenerate 1

    While Date($(vMin)) + Iterno() -1 <= $(vMax);

    MasterCal:

    Load Date,

    Month(Date) as month,

    Year(Date) as Year

    Resident Temp;

    Drop table Temp;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
srinivasa1
Creator II
Creator II
Author

hey i think it will help full to me. i need qurter also in this can you pls guide me.will get back to you about ur ans.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   add this.

   'Q' & Ceil(Month(Date)/3) & '/' & Year(Date) AS Qurter

  

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
srinivasa1
Creator II
Creator II
Author

wow !!!! it is working thx Kaushik......bit bussy last week..not able to reply..

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Glad to help..

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
dseelam
Creator II
Creator II

Hi Kaushik,

   The below statement working perfectly alright but does the past 12 months will be changing daily once the script is reloaded ?

   Let vMin = num(Makedate(2011,01,01));

   Let vMax = num(today());

   Temp:

    Load

      Date($(vMin) + Iterno() -1) as Date

    Autogenerate 1

    While Date($(vMin)) + Iterno() -1 <= $(vMax);

    MasterCal:

    Load Date,

    Month(Date) as month,

    Year(Date) as Year

    Resident Temp;

    Drop table Temp;