#1 2009-08-06 11:24:06

dom
New member
Registered: 2009-08-06
Posts: 2

Split a date range

Tags: [date, range, split]

Hello,

  I need to split a date rage into days. Per example:

I read from the database:

| Application | Start                   | stop
+-------------+---------------------+-----
| App1         | 2009/08/03 10:00 | 2009/08/05 12:15

And I need to split this line into something like this

| Application | Start                   | stop
+-------------+---------------------+-----
| App1         | 2009/08/03 10:00 | 2009/08/05 23:59
| App1         | 2009/08/04 00:00 | 2009/08/04 23:59
| App1         | 2009/08/05 00:00 | 2009/08/05 12:15

Can some one  help me?

many thanks
Dominique

Offline

#2 2009-08-06 11:55:43

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: Split a date range

Hello Dominique
It is possible to finish it in Talend, I will give you an example later, just want to confirm if you write a error output.
| App1         | 2009/08/03 10:00 | 2009/08/05 23:59   ??
i think it is
| App1         | 2009/08/03 10:00 | 2009/08/03 23:59
right?
Best regards

         shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2009-08-06 12:44:36

dom
New member
Registered: 2009-08-06
Posts: 2

Re: Split a date range

Hello shong,

  it's not an error, I write the date in a "french" format. The pattern is "YYYY/MM/DD HH:MM"

The goal is to build reports of the use of various applications. My problem is when the application is used more than one day. Per exemple monday, at work, I open Outlook and I close the application friday. If I do a "close date - start date", I get a big usage one day and nothing other days of the week. Does you understand what I will do?

Sorry for my bad english

best regards
Dominique

Offline

Board footer

Powered by FluxBB