bcp export date colunmns 
Author Message
 bcp export date colunmns

A simple but {*filter*} problem I did not find anything about
in my previous deja research:
When exporting tables with columns of datetime and smalldatetime
from sqlserver 6.5 to ASCII files bcp generates date format
  17.12.98 13:44       (german sql server installation).
Now, we certainly want 4 digit year.
Is there any way to have it export date columns with 4 digit year
by default like for instance 17.12.1998 13:44 or any other technical
useful format (numbers only)?
I want to avoid creating views on sql server at first where I
use convert() on datetime columns and then export the view instead
of the table itself.
I think is quite rubbish to handle it the way bcp does and export
a 2 digit year number.
There must be a simple solution to this, I just did not find it...
Regards, Phil
--



Tue, 23 Apr 2002 03:00:00 GMT
 bcp export date colunmns

Phil,

Quote:
> There must be a simple solution to this

There is indeed a simple solution. Use views. To the best of my knowledge,
there are zero alternative "simple" options.


Quote:
> A simple but {*filter*} problem I did not find anything about
> in my previous deja research:
> When exporting tables with columns of datetime and smalldatetime
> from sqlserver 6.5 to ASCII files bcp generates date format
>   17.12.98 13:44       (german sql server installation).
> Now, we certainly want 4 digit year.
> Is there any way to have it export date columns with 4 digit year
> by default like for instance 17.12.1998 13:44 or any other technical
> useful format (numbers only)?
> I want to avoid creating views on sql server at first where I
> use convert() on datetime columns and then export the view instead
> of the table itself.
> I think is quite rubbish to handle it the way bcp does and export
> a 2 digit year number.
> There must be a simple solution to this, I just did not find it...
> Regards, Phil
> --




Tue, 23 Apr 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. BCP Export by Date Range

2. BCP Export by Date Range

3. BCP Utility - Exporting Dates

4. sql-dmo export dat via bcp (date issue)

5. BCP export (6.5) - BCP import (7.0) Problem

6. BCP Export on SQL Sercer 6.5

7. BCP export problem

8. BCP out export unreadable Data

9. bcp / double quote / export

10. Converting Export Data Wizard information to BCP command line syntax

11. Exporting data with BCP


 
Powered by phpBB® Forum Software