Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Time Stamps Diffrence

Dear ALL,

hope you can help,

I need to calculate the difference days between to field formed as timestamp example

Starting Time :

3/27/2017 4:45:25 AM

Ending Time:

4/3/2017  9:55:23 AM

noting that the above stamp time formed as Number Initialy

the output filed should be the difference days between Ending and Starting time without takin into consideration the weekends Saturday and Sunday

OUTPUT IN THAT CASE: 7 instead of 9 since we have to days weekend.

Thank you,

Mario

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

Load

NetWorkDays(Start,End) as Days,

Start,End;

Load

Timestamp#(Start,'M/DD/YYYY h:mm:ss TT') As Start,

Timestamp#(End,'M/DD/YYYY h:mm:ss TT') As End

inline

[

Start,End

3/27/2017 4:45:25 AM,4/3/2017 9:55:23 AM

];

View solution in original post

2 Replies
sasiparupudi1
Master III
Master III

Load

NetWorkDays(Start,End) as Days,

Start,End;

Load

Timestamp#(Start,'M/DD/YYYY h:mm:ss TT') As Start,

Timestamp#(End,'M/DD/YYYY h:mm:ss TT') As End

inline

[

Start,End

3/27/2017 4:45:25 AM,4/3/2017 9:55:23 AM

];

YoussefBelloum
Champion
Champion

Hi,

try this:

=networkdays(Date(starting_time_field),Date(ending_time_field))