You can enter any datetime format in the Format String field in the Column Format Settings dialog box. For example, you can specify the datetime format as MM/YYYY. Or, you can specify the time only, for example, HH24:MI.
To specify the datetime format, choose Format String and enter the format in the Format String field. You can choose a format from the list, or you can enter a format using the keyboard. The default format is MM/DD/YYYY HH24:MI:SS, which has a field width of 19.
For example, the source data contains a datetime field with the following data:
11/28/2002
10/15/2003
Enter the following format in the flat file source definition: MM/DD/YYYY.
For example, you want to output the data above to a file target with the following format:
28-11-2002
15-10-2003
Enter the following format in the flat file target definition: DD-MM-YYYY.
You can also enter any single-byte or multibyte string literal in the Format String field. To enter a string literal, enclose it in double quotes (“”). When you enter string literals in the format string, the Integration Service writes the strings to the file target when it runs the session. You might want to add string literals to describe the different date parts.
For example, you enter the following text in the Format String field:
“Month”MM/”Day”DD/”Year”YYYY
When you run the session and the Integration Service outputs the date October 21, 2002, it writes the following to the target file: