Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculation of years weeks and date total working dates

Hi i have employees joining date,time and end date, time.

how to find total working days excluding Saturday,Sundays

Field like

Employee ID     DOJ              Date_Time    End_Date      End_Time

1001                 07/02/2015    10:35am       08/08/2018     9:50

14 Replies
Anonymous
Not applicable
Author

Dear Than Mughi,

It will show like

EmployeeID DOJ Date_Time End_Date End_Time Days Years Months Weeks
100405/09/201406.00am04/10/201610.000-1Years+0Months-1Months+0days-1weeks+0days
100506/07/201507.00am15/06/201809.000-1Years+0Months-1Months+0days-1weeks+0days
100208/04/201509.56am09/10/201810.000-1Years+0Months-1Months+0days-1weeks+0days
100107/02/201510:35am08/08/20189:500-1Years+0Months-1Months+0days-1weeks+0days
100310/03/201611.20am14/05/201711.000-1Years+0Months-1Months+0days-1weeks+0days
thannila
Creator
Creator

why you are getting null values?.I have attached my sample file.It's working.check it

PFA,

thannila
Creator
Creator

Replace your qlikview main function with these following script.

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='₹ #,##0.00;-₹ #,##0.00';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';

SET FirstWeekDay=6;

SET BrokenWeeks=1;

SET ReferenceDay=0;

SET FirstMonthOfYear=1;

SET CollationLocale='en-IN';

SET CreateSearchIndexOnReload=1;

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';

SET NumericalAbbreviation='3:k;6:M;9:G;12:T;15:P;18:E;21:Z;24:Y;-3:m;-6:μ;-9:n;-12:p;-15:f;-18:a;-21:z;-24:y';

Now execute the above mentioned code it will work.

Anonymous
Not applicable
Author

hi its working thanks for it

EmployeeID DOJ Date_Time End_Date End_Time Days Years Months Weeks
100405/09/201406.00am04/10/201610.005432Years+1Months25Months+3days108weeks+6days
100506/07/201507.00am15/06/201809.007702Years+9Months35Months+8days153weeks+7days
100208/04/201509.56am09/10/201810.009153Years+5Months42Months+7days182weeks+6days
100107/02/201510:35am08/08/20189:509133Years+5Months42Months+6days182weeks+6days
100310/03/201611.20am14/05/201711.003071Years+2Months14Months+3days61weeks+3days
thannila
Creator
Creator

If it is correct mark this one as helpful and close the thread.