Emp login_timestamp Logout_timestamp
A,2019-02-01 02:24:15,2019-02-01 04:59:42
B,2019-03-29 14:43:30,2019-03-29 20:22:00
ABC,2019-03-29 12:43:00,2019-03-29 23:22:59

In the above calculate the duration of hours spent in office for each emp in datastage.



Emp login_timestamp Logout_timestamp A,2019-02-01 02:24:15,2019-02-01 04:59:42 B,2019-03-29 14:4..

Answer / geepee

Transfromer Fun:



The above scenario can be solved using transformer stage date functions.

Stagervar1: SecondsSinceFromTimestamp(DSLink3.Logout_timestamp, DSLink3.login_timestamp) - Float datatype

Duration: TimeFromMidnightSeconds(StageVar1) -- Time datatype

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

how to use self join using datastage ? can u tell me using stage how can we implemnet the self join

0 Answers  


EXPLAIN SCD

0 Answers   CTS,


HOw Hash Partion Works Thank you in Advance i have doubts on Hash Partion TEch Could please give me the clear understandable notation example e_id,dept_no 1,10 2,10 3,20 4,20 5,30 6,40 i have TWo Nodes/Three Nodes My questions are: 1).if i select hash key as e_id how Hash partion will distribute the data in to two NOdes/three NOdes 2).if i select hash key as dept_no how Hash partion will distribute the data in to two NOdes/three NOdes sivakumar.katta7@gmail.com

5 Answers   FIS,


What are the third party tools you used in your project?

1 Answers   IBM,


What is the use of Row generator stage?

2 Answers  






What are the functionalities of link partitioner and link collector?

0 Answers  


how to sort two columns in single job in datastage.

1 Answers   TCS,


There are two file are there .1st file contains 5 records and 2nd file contain 10 records in target they want 50 records.how can achieve this

5 Answers   IBM,


deptno wise to find max and min,and sum of rows and in target to company wise maximum

1 Answers   IBM, TCS,


What is oci?

0 Answers  


input Name Salay Sam 10 Sam 30 Sam 20 Ram 40 Ram 50 Output should be Name Salary Count Sam 10 3 Ram 40 2 get min salary and count of name . OutPut 2 Name Seq Sam 1 Sam 2 Sam 3 Ram 1 Ram 2

1 Answers   HCL,


i/p 1,a,1000 2,b,2000 3,c,3000 i want to get o/p as o/p 1,a,3000 2,b,4000 3,c,5000 how it can be done on using datastage?

5 Answers   HSBC,


Categories