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

State the difference between an operational datastage and a data warehouse?

0 Answers  


Source has 2 columns: USA,NewYork INDIA,MUMBAI INDIA,DELHI UDS,CHICAGO INDIA,PUNE i want data in target like below: INDIA,MUMBAI1 INDIA,DELHI2 INDIA,PUNE3 USA,NEWYORK1 USA,CHICAGO2

0 Answers  


What is process model?

0 Answers  


What is meta stage?

0 Answers  


how to find diff between 2 dates without using Icon... funtions?

1 Answers  






whats difference between ls -ltr and ls -lrt?

5 Answers   L&T,


Scenario : I have 2 jobs say job A and Job B with parameters x and y respectively. I need to create a sequence job. If we pass parameter x then Job A should run, If we pass parameter y then Job B should run, if we dont pass any parameter then Both Job A & B should run.

4 Answers   iGate, Thirdware,


What are sequencers?

0 Answers  


Hi, My source is oracle(eno,ename,sal,commision,...), my requirement is like this, if there is a null values in commission col i want to keep it as null,and for the remaining first two characters of the value in my target. Plz help me

1 Answers  


EXPLAIN SCD

0 Answers   CTS,


1)s.key generate 1 to 700 records today. tomorrow another 400 will updated how to update the records using s.key generator? 2)source is like :-- DB --> T/F stage1 --> seq1file T/f 1 is linking with T/F2 ---> seq 2 how to load the data? in source i given some conditions those r going in seq1. The another data will going to seq2 how to do this ?

0 Answers   Wipro,


I WANT TO SEND SYSDATE AS PARAMETER,SO WHAT COMMAND I SHOULD USE TO CALL SYSDATE?

4 Answers   ME,


Categories