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  


What is exact difference between Parallel Jobs and server Jobs..

8 Answers   DELL, IBM,


Converting Vertical PIVOTing without using PIVOT stage in DataStage. Ex: DEPT_NO EMPNAME 10 Subhash 10 Suresh 10 sravs Output: DEPT_NO EMP1 EMP2 EMP3 10 subhash suresh sravs 2) How to implement Horizontal PIVOTing without using PIVOT stage.

3 Answers   Cognizant, UHG,


whats difference between ls -ltr and ls -lrt?

5 Answers   L&T,


source file having the data like aabbccc, i want target file result like a1a2b1b2c1c2c3.

2 Answers  






what is the difference between lookup stage reject link and merge stage reject link in datastage Parallel jobs?

9 Answers   HCL,


1)How to Duplicate Records Delete in Sequential file?

4 Answers   IBM, TCS,


Explain the datastage parallel extender (px) or enterprise edition (ee)?

0 Answers  


i have 3 diffrent tables. 1) US rate data 2)CANADA rate data and 3)MEXICO rate data. All 3 tables have 6 collumns each. 4 collumns are commun to all tables and 2 are diffrent. Now at target i want single table say Country rate which will have (4+2+2+2+1 flag) 11 collumns. I will add a flag collumn which will indicate country and will put nullable collumns which are not common to other. How i can implement this in datastage?

1 Answers   ABC,


What are the types of containers?

0 Answers  


can explain wt is the pool for file.

1 Answers   CTS,


What is the difference between lookup and sparse lookup?

1 Answers  


Categories