About EasyMorph Tutorials & Examples Web-help

Timeclock transformation


#1

Hi

I have a table with time clock with this type of data

Employee, Date, Time

20022, 2015/12/01, 09:00
20022, 2015/12/01, 13:05
20022, 2015/12/01, 14:30
20022, 2015/12/01, 18:30
20023, 2015/12/01, 09:05
20023, 2015/12/01, 12:55
20023, 2015/12/01, 19:01
20024, 2015/12/01, 18:05

I need to transform to

Employee Date Time1 Time2 Time3 Time4

20022 2015/12/01 09:00 13:05 14:30 18:30
20023 2015/12/01 09:05 12:55 19:01
20024 2015/12/01 18:05

Is there a way to do this?

Thanks

Hugo Meneses


#2

Hi Hugo,

It looks like pivoting would do it.

First, calculate the new column names. Rank by Time grouped by by Employee and Date would help here. Then use the Pivot transformation for Time.

See the example below.
pivot.morph (2.6 KB)
data.txt (228 Bytes)


#3

Perfect

Thanks a lot

Hugo