File Processor Agent File – Date Time

<< Click to Display Table of Contents >>

 >Live > Agents > File Agents > File Processor > Settings > File >

File Processor Agent File – Date Time

The date and time settings are used to set DT_LOGGER.UTC_OFFSET_HRS and DT_LOGGER_DATUM.DATUM_UTC_DT.

 

Setting

Type

Description

dateTimeColumnHeaderRegex

Regex

Date and time (or date only) column header text pattern.

 

e.g., Date.*Time (see Geokon example) or Date|Date Time (see YSI-6 example).

 

A date and time column must be present in all files that the agent processes.

dateTimeFormats

String

Custom date and time format strings (see HOBO example and YSI-6 example).

 

OA = OLE Automation date (see Geokon example).

 

Empty lets the DateTime.Parse(String) method figure out the date and time format automatically (using an invariant culture info that is independent of the user's local settings). But this can run into problems if the date and time can have a double meaning (e.g., if the date and time can be interpreted as either dd/MM/yyyy or MM/dd/yyyy, it uses the latter).

 

e.g., dateTimeFormats = 'dd-MM-yyyy HH:mm|d/M/y H:m:s|'

 

Split using '|' = { 'dd-MM-yyyy HH:mm', 'd/M/y H:m:s', '' }

 

1.Try to parse date time using dd-MM-yyyy HH:mm (day-month-year hour:minute).

Else

2.Try to parse date time using d/M/y H:m:s (day/month/year hour:minute:second).

Else

3.Try to parse date time automatically.

 

If all 3 fail, log an error message, and continue with the next line of data.

dateTimeUtc

Boolean

Are the dates and times in the files in UTC?

 

See LoggerDatum example.

 

Also see utcOffsetHrs setting description.

timeColumnHeaderRegex

Regex

Time (only) column header text pattern.

 

e.g., Time (see YSI-6 example).

 

Added to dateTimeColumnHeaderRegex column value.

timeFormats

String

Same as dateTimeFormats, except this setting is used to parse timeColumnHeaderRegex, instead of dateTimeColumnHeaderRegex.

 

e.g., HHmmss|

 

Split format strings using pipes; = { 'HHmmss', '' }

 

1.Try to parse date time using HHmmss (hour minute second, without spaces or colons, e.g., 082613 => hour = 08, minute = 26, second = 13).

Else

2.Try to parse date time using the computer's culture info.

 

If both fail, log an error message, and continue with the next line of data.

utcOffsetHrs

Float

DT_LOGGER.UTC_OFFSET_HRS is set as follows, when adding new loggers:

 

1.If utcOffsetLineRegexGroups is not empty and a line in the file's header contains this pattern (see HOBO example, and YSI-EXO example):
 
= the utcOffsetLineRegexGroups named group's value.

Else

2.= utcOffsetHrs value, or 0 if utcOffsetHrs is empty.

 

DT_LOGGER_DATUM.DATUM_UTC_DT is set as follows:

 

1.If dateTimeUtc = true;
 
= the file dates and times, without any offset applied
(see LoggerDatum example).

Else

2.If utcOffsetLineRegexGroups is not empty and a line in the file's header contains this pattern;
 
= the file dates and times – the utcOffsetLineRegexGroups named group's value (see HOBO example, and YSI-EXO example).

Else

3.= the file dates and times – the logger's UTC_OFFSET_HRS, which is initially utcOffsetHrs, but may be changed later (see Lorentz example).

 

Note: utcOffsetLineRegexGroups does not currently support time zone names (e.g., AUS Eastern Daylight Time), only numerical values (e.g., -05:00).

utcOffsetLineRegexGroups

Regex Named Groups