You can specify certain datetime formats at the table level in a SQL*Loader control file. The syntax for each is as follows:
DATE FORMAT mask TIMESTAMP FORMAT mask TIMESTAMP WITH TIME ZONE mask TIMESTAMP WITH LOCAL TIME ZONE mask
This specification is used for every date or timestamp field unless a different mask is specified at the field level. A mask specified at the field level overrides a mask specified at the table level.
The following is an example of using the DATE
FORMAT
clause in a SQL*Loader control file. The DATE
FORMAT
clause is overridden by DATE
at the field level for the hiredate and entrydate fields:
LOAD DATA INFILE myfile.dat APPEND INTO TABLE EMP FIELDS TERMINATED BY "," DATE FORMAT "DD-Month-YYYY" (empno, ename, job, mgr, hiredate DATE, sal, comm, deptno, entrydate DATE)
"Datetime and Interval Data Types" for information about specifying datetime data types at the field level