Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello clever people. Need some assistance with dates please.
We track some MI on our employee longevity so that we can acknowledge employee anniversaries for key milestones. I am loading information from a Sybase DB and base everything off the Employee_Start_Date.
If the start date is 11/16/2008 I would like to create a date reflective of this year so 11/16/2018. I can therefore easily subtract the two dates and see that the employee is celebrating 10 years with the firm. This needs to carry forward for future years too.
In EXCEL is can do this by =DATE(YEAR(NOW()),MONTH(H2),DAY(H2)) where H2 is the start date.
I am not having much success getting this same result in Qlikview. HELP...
This formula below works with the data in my sample script when I paste it in a Text object.
=Date(Num(Month(H2)) & '/' & Day(H2) & '/' & Year(Now()))
In my script for this example, I loaded a one-record table with the date you provided.
Dates:
Load * Inline [
Key, H2
1, 11/16/2008
];
You may have to adjust it to your data. Please post a sample of what you're using, in the event that it doesn't work when you plug it in.
I hope this helps.
You can use the SetDateYear function: SetDateYear('11/16/2008', 2018) -> 11/16/2018