4 Replies Latest reply: May 18, 2017 10:07 PM by Luis Gabriel Moreno Bravo RSS

    Creating dynamic dates in URLs

    Luis Gabriel Moreno Bravo

      Hello friends. I have some questions.

      1.- I have a URL where I just want the months and the year to change.

      2.- When the month reaches 12, I want them to change to the next year.

      Could anyone help me with this topic?

      I leave the script:

      vMaxMes = 12;

      vMinMes = 1;

      vMaxAño = 2017


      FOR vMes = 1 to $(vMaxMes) - 1



      LOAD @1 as [Mes],

        @2 as [Año],

        @3 as [Subdirección],

        @4 as [División],

        @5 as [Zona Distribución],

        @6 as [Usuarios Totales (Promedio) (#)],

        @7 as [DEMUA TIUT Sin Eventos (Minutos)],

        @8 as [DEMUA por Eventos TIUT (Minutos)],

        @9 as [DEMUA TIUT con Eventos (Minutos)],

        @10 as [TIUT Acumulado sin Eventos (Minutos promedio)],

        @11 as [TIUT Acumulado con Eventos (Minutos promedio)],

        @12 as [Meta TIUT (Minutos promedio)],

        @13 as [DEMUA SAIDI Sin Eventos(Minutos)],

        @14 as [DEMUA por Eventos SAIDI (Minutos)],

        @15 as [DEMUA SAIDI con Eventos (Minutos)],

        @16 as [SAIDI Acumulado sin Eventos (Minutos Promedio)],

        @17 as [SAIDI Acumulado con Eventos (Minutos Promedio)],

        @18 as [Meta SAIDI (Minutos Promedio)],

        @19 as [Usuarios Interrumpidos sin Eventos SAIFI (usuarios)],

        @20 as [Usuarios Interrumpidos por Eventos SAIFI (usuarios)],

        @21 as [Usuarios Interrumpidos con Eventos SAIFI (usuarios)],

        @22 as [SAIFI Acumulado sin Eventos (Interrupciones Promedio por Usuario)],

        @23 as [SAIFI Acumulado con Eventos (Interrupciones Promedio por Usuario)],

        @24 as [Meta SAIFI (Interrupciones Promedio por Usuario)],

        @25 as [Clave División],

        @26 as [Clave Zona],

        if(@27='Z','Zona',if(@27='D','División',if(@27='N','Nacional'))) as [Granularidad]



      (txt, utf8, no labels, delimiter is '|', msq);




      //STORE Saidi into [C:\CFE\01._Extraccion\QVD\Ext_Saidi_$(vMaxAño)_$(vMes).qvd](qvd);