I'm using the BCP command in a BAT file to export one of my DB table in a text file (SQLServer 6.5).
Output includes a datetime column.
The BCP output file looks like :
sept./21/2002 10:40;Tom;London
sept./21/2002 10:44;Tina;Glasgow
.....
When I try to use BCP to input the file, I got an "invalid date format error message".
The valid date format accepted by BCP (in) is no more sept./21/2002 but 09/21/02 !
The input file must be then :
09/21/02 10:40;Tom;London
09/21/02 10:44;Tina;Glasgow
.....
The date fields must be translated in the file beetween out and in.
Where is the datetime format description ? Why is this description used differently between BCP (out) and BCP (in) ?
The date format used by BCP (out) is also the format in a select SQL request with SQL Enterprise Manager.
Thanks for any clue.
Output includes a datetime column.
The BCP output file looks like :
sept./21/2002 10:40;Tom;London
sept./21/2002 10:44;Tina;Glasgow
.....
When I try to use BCP to input the file, I got an "invalid date format error message".
The valid date format accepted by BCP (in) is no more sept./21/2002 but 09/21/02 !
The input file must be then :
09/21/02 10:40;Tom;London
09/21/02 10:44;Tina;Glasgow
.....
The date fields must be translated in the file beetween out and in.
Where is the datetime format description ? Why is this description used differently between BCP (out) and BCP (in) ?
The date format used by BCP (out) is also the format in a select SQL request with SQL Enterprise Manager.
Thanks for any clue.