Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Kohli
Creator II
Creator II

Current Year Variable?

I have table like....

        

EmpIDFirst NameLast NameGenderDateOfBirthStartDateEndDateOfficeIDJobTitle
1ErikFredriksen15/22/19601/1/20082CEO
2JennyOlafson01/18/19794/1/20102Personal Assistant
3FredrikNilsson19/12/19714/1/20102IT Manager
4BinhProtzmann14/5/197310/1/20081Global Product Manager
6RolfWesenlund18/29/19785/1/20132BI Manager
7ErinBell010/31/19688/1/20101CMO
8MikeMcDonald11/2/19667/1/20111Regional Sales Manager Americas
9BingMartin112/12/19791/1/20132Product Marketing Analyst
10RicardoGucci14/6/19819/1/20124Account Manager OEM
11GwendolynCavendish09/6/19771/1/200912/31/20112Account Manager
12FionaHunter02/22/19711/1/20096/30/20111Account Manager
13EvelynBrown09/16/19713/1/20091/31/20122Account Manager
15HelenaDu Froid06/18/19607/1/20114Regional Sales Manager Europe

I want create the variable for Current Year . Please suggest me how to create the variable for that?

4 Replies
bbmmouha
Creator
Creator

do you whant the age ??

age(Now(),DateOfBirth) as age

or you whant the year from StartDate ?

Year(StartDate) as year

may you explane

balabhaskarqlik

May be:

Let vYear = Year(Today());

Let vYear1 = Year(Date(Today(), 'MM/DD/YYYY'));

jonathandienst
Partner - Champion III
Partner - Champion III

Your first expression is OK, but the Date formatting function here:

Let vYear1 = Year(Date(Today(), 'MM/DD/YYYY'));

is completely superfluous.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Kohli
Creator II
Creator II
Author

Hi bala, r u from bangalore.