Previous page

Next page

Import Actual Timebands - CSV (txt) Format

Time & Attendance | Import Actual Timebands command

Summary

Use this command to import timebands from a third-party software package or from a file that meets the format criteria.

CSV (txt) format fields

Each imported timeband must have at least 26 fields, and the first 4 fields must contain values.

Note that the 27th field, Text, is optional

BuildThisField(pTBFile, lsFieldList, 'EmployeeCode');

BuildThisField(pTBFile, lsFieldList, 'Date');

BuildThisField(pTBFile, lsFieldList, 'StartTime');

BuildThisField(pTBFile, lsFieldList, 'EndTime');

BuildThisField(pTBFile, lsFieldList, 'ReasonCode');

BuildThisField(pTBFile, lsFieldList, 'BreakAmount');

BuildThisField(pTBFile, lsFieldList, 'BreakCode');

BuildThisField(pTBFile, lsFieldList, 'RequirementCode');

BuildThisField(pTBFile, lsFieldList, 'WorkAreaCode');

BuildThisField(pTBFile, lsFieldList, 'LocationCode');

BuildThisField(pTBFile, lsFieldList, 'DepartmentCode');

BuildThisField(pTBFile, lsFieldList, 'Dim1Code');

BuildThisField(pTBFile, lsFieldList, 'Dim2Code');

BuildThisField(pTBFile, lsFieldList, 'Dim3Code');

BuildThisField(pTBFile, lsFieldList, 'Dim4Code');

BuildThisField(pTBFile, lsFieldList, 'PositionCode');

BuildThisField(pTBFile, lsFieldList, 'TaskCode');

BuildThisField(pTBFile, lsFieldList, 'ShiftCode');

BuildThisField(pTBFile, lsFieldList, 'ShiftGroupCode');

BuildThisField(pTBFile, lsFieldList, 'Type1Code');

BuildThisField(pTBFile, lsFieldList, 'Type2Code');

BuildThisField(pTBFile, lsFieldList, 'Type3Code');

BuildThisField(pTBFile, lsFieldList, 'Type4Code');

BuildThisField(pTBFile, lsFieldList, 'AwardCode');

BuildThisField(pTBFile, lsFieldList, 'RateCode');

BuildThisField(pTBFile, lsFieldList, 'RateAmount');

BuildThisField(pTBFile, lsFieldList, 'Text');

Datatypes

The following table shows the datatypes of these 26 fields:

Field

Datatype

'EmployeeCode'

Char, 12

'Date'

Date

'StartTime'

Integer

'EndTime'

Integer

Note: The StartTime and EndTime values are the number of minutes past midnight.

'ReasonCode'

Char, 12

'BreakAmount'

Integer

'BreakCode'

Char, 12

'RequirementCode'

Char, 12

'WorkAreaCode'

Char, 12

'LocationCode'

Char, 12

'DepartmentCode'

Char, 12

'Dim1Code'

Char, 12

'Dim2Code'

Char, 12

'Dim3Code'

Char, 12

'Dim4Code'

Char, 12

'PositionCode'

Char, 12

'TaskCode'

Char, 12

'ShiftCode'

Char, 12

'ShiftGroupCode'

Char, 12

'Type1Code'

Char, 12

'Type2Code'

Char, 12

'Type3Code'

Char, 12

'Type4Code'

Char, 12

'AwardCode'

Char, 12

'RateCode'

Char, 12

'RateAmount'

Double, 11, 4

'Text'

Char, 250

 

File format

Example 1 - Mandatory and other fields, without Text field

One timeband in the CSV import file has the following format:

1005,20090615,555,975,,0,,,,,,,,,,,,,,,,,,,0,20.09

Field

Value

'EmployeeCode'

1005

'Date'

20090615

'StartTime'

555

'EndTime'

975

'ReasonCode'

(no value)

'BreakAmount'

0

From 'BreakCode' to 'AwardCode'

(no values)

'RateCode'

0

'RateAmount'

20.09

Because the last field has data in it (20.09), there is no need for a trailing comma


Example 2 - Mandatory fields only, without Text field

Another timeband in the CSV import file has the following format:

1006,20090615,550,980,,,,,,,,,,,,,,,,,,,,,,,

Field

Value

'EmployeeCode'

1006

'Date'

20090615

'StartTime'

550

'EndTime'

980

From 'ReasonCode' to 'RateAmount'

(no values)

If you import only the first 4 mandatory fields, then you still have to include comma placeholders for the 22 empty fields, to have a total of 26 commas. Because the last field has no data in it, there is a need for an extra trailing comma.

 

Example 3 - Mandatory fields only, plus Text field

Another timeband in the CSV import file has the following format:

1006,20090615,550,980,,,,,,,,,,,,,,,,,,,,,,,This is text

Field

Value

'EmployeeCode'

1006

'Date'

20090615

'StartTime'

550

'EndTime'

980

From 'ReasonCode' to 'RateAmount'

(no values)

If you import only the first 4 mandatory fields and the text field, then you have to include comma placeholders for the 22 empty fields prior to the text field (which is in position 27), to have a total of 26 commas. No trailing comma is required.

Previous page

Next page