Forum Discussion

SBaldwin93's avatar
SBaldwin93
Copper Contributor
Jun 28, 2023
Solved

Breaking up two brackets of dates to individual rows

Hi all

 

I pull a lot of data off a database and do a lot of work around holidays and overtime. The problem I have a lot is when you book say a week off work in one block and export the data its one single line on excel is it possible to break that data up so it shows 1 line per day if you know what I mean… I have given an example below

 

RawData

 

Date From

Date To

Info

Subt

Description

From

to

Hours

Employee Name

Employee number

14.08.2022

14.08.2022

Holiday 

Holiday

 

 

12

John Smith

12345

12.06.2022

15.06.2022

Holiday

 

Holiday

 

 

48

Bob Jones

54321

 

 

This is how I would like it to be formatted

 

Date From

Date To

Info

Subt

Description

From

to

Hours

Employee Name

SAP No

14.08.2022

14.08.2022

Holiday 

Holiday

 

 

12

John Smith

12345

12.06.2022

12.06.2022

Holiday

 

Holiday

 

 

12

Bob Jones

54321

13.06.2022

13.06.2022

Holiday

 

Holiday

 

 

12

Bob Jones54321

14.06.2022

14.06.2022

Holiday

 

Holiday

 

 

12

Bob Jones54321

15.06.2022

15.06.2022

Holiday

 

Holiday

 

 

12

Bob Jones54321

 

5 Replies

    • SBaldwin93's avatar
      SBaldwin93
      Copper Contributor

      Lorenzo  This is amazing thank you so much!!!!!!!  Just looking at it now... it seems to pick up single days off well however when there is a block booking it seems to add a day at the end and not pick up the first day, ive had a look in power quays and cant  see what needs to be changed see below as an example 

       

      Raw Data

       

      01.06.202201.06.2022Abs100Holiday  12John Smith12345
      26.07.202229.07.2022Abs100Holiday  48John Smith12345
      05.08.202205.08.2022Abs100Holiday  12John Smith12345

       

      Result

      01/06/202201/06/2022Abs100Holiday  12John Smith 12345
      05/08/202205/08/2022Abs100Holiday  12John Smith 12345
      27/07/202227/07/2022Abs100Holiday  12John Smith 12345
      28/07/202228/07/2022Abs100Holiday  12John Smith 12345
      29/07/202229/07/2022Abs100Holiday  12John Smith 12345
      30/07/202230/07/2022Abs100Holiday  12John Smith 12345

       

       

Resources