Summary

Converts a table with a column containing a date and two columns containing times into a table with two columns containing each date and time. Many operators require this format, e.g., the Scaling 8.2.

Version 2.0 passes through all other columns.

Example:

Configuration

Input settings of existing table

Name

Value

Opt.

Description

Example

Date (from)

System.DateTime

-

Column for start date

col1

From time

System.DateTime

-

Column for from time

col2

To time

System.DateTime

-

Column for to time

col3

Settings

Name

Value

Opt.

Description

Example

Ignore data sets with 0 minutes length

System.Boolean

-

Should data sets whose length equals 0 minutes be ignored?

-

Ignore from-time = to-time = 0:00

System.Boolean

-

Should data sets in which the start time and the end time are 0:00 be ignored?

-

Count as 24 hours if from-time equals to-time.

System.Boolean

-

Should data sets in which from time is equal to to time be counted as 24 hours?

-

Remarks

Converts an IDurations table (date/time/time) into a Durations table (date+time/date+time) in order to enable further operations (see Types of Tables), as some operators can only be applied to Durations tables, e.g., the operator Scaling 8.0.

Want to learn more?

Screenshot

Examples

Example: Convert all rows

Situation

The file Import_5.txt with the following structure has already been imported with the operation Import text or CSV file with manual column assignment 3.0

  • Condition for the conversion: All rows should be imported. If From-time is identical with To-time, the length shall be 0.


Please note: For information about the settings for the import operations refer to example 1 at Import text or CSV file with manual column assignment 3.0.
Do not forget to set the type of the result table to IDurations (conversion necessary).

Settings



Result

TIS Project

-


Example 2: Ignore rows with From=0:00 hours and To=0:00 hours

Situation

The file Import_5.txt with the following structure has already been imported with the operation Import text or CSV file with manual column assignment 3.0.

  • Condition for the conversion: Only those rows should be imported which do not contain "0:00 to 0:00". If From-time is identical with To-time, the length shall be 0 minutes.

Settings

Result

→ Missing due to an error in the operator. Ticket BugFLEX-39 - Fehler in Operator Convert From-Date/To-Date/To-Time Accepted


Example 3: If Start time = End time, count 24 hours but ignore the entries From=0:00 hours and To=0:00 hours



Situation

The file Import_5.txt with the following structure has already been imported with the operation Import text or CSV file with manual column assignment 3.0.

  • Condition for importing: Only those rows should be imported which do not contain "0:00 to 0:00". If From-time is identical with To-time, the length shall be 24 hours.

Settings

Result

The entry of 2007/01/03 is not taken over into the result table, because both the From-column and the To-column values are 0:00. The entry of 2007/01/04 has a length of 24 hours.


Troubleshooting

Problem

Frequent Cause

Solutions

The operator "Conversion" is not available...

Often, this is due to a mistake in the preceding import (see Import text or CSV file with manual column assignment 3.0)

Please check, if in the import operation under Type of the result column you have selected the type IDurations (conversion necessary). See also Tabellentyp (link to old Wiki).



Related topics