Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
In a macro i wrote a code that select a year, month and day, I select the values from today() function. In a model i have too a year-week, i need to select this field from another data, ie, year + month + day, all in a macro...
If i use the function week() in a macro it does not work.
any idea...?
thks.
try with datepart("ww", date)
What format is your week column in? We use WWYYYY a lot.
Week() will give you the WW and WeekYear() should give you the YYYY. You probably want:
Week(Today()) & WeekYear(Today())
hi Dragonauta,
Do you speak spanish?, ok, can you explain datepart function pls, i cannot find this command in QV manuals...
thks.
I don't think DatePart is a QlikView function. I know it exists in T/SQL and VBScript though.
sí hablo español.
datepart es una función de vbscript, porque según entiendo lo quieres usar en una macro, no? Y ahí puedes usar vbscript y/o jscript.
aquí hay más información de la función si quieres: