Thursday, March 8, 2012

Date Formats

We have recently upgraded from SQL 6.5 to SQL 2000, and are having problems
with the date format in BCP'd files.
Previously 6.5 would output dates such as 1 Jan 2004 and 20 Jan 2004, but
SQL 2000, leaves a leading zero on 01 jan 2004.
I have used the convert function to make to date to 01 jan 2004, but how do
I suppress the leading zero on the date ?
Any help would be appreciarted
MarkYou could make your own function, along these lines:
http://www.aspfaq.com/2460
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Flems" <Mark.Flemans@.apakgroup.com> wrote in message
news:O5JaVwdAEHA.2480@.TK2MSFTNGP12.phx.gbl...
> We have recently upgraded from SQL 6.5 to SQL 2000, and are having
problems
> with the date format in BCP'd files.
> Previously 6.5 would output dates such as 1 Jan 2004 and 20 Jan 2004, but
> SQL 2000, leaves a leading zero on 01 jan 2004.
> I have used the convert function to make to date to 01 jan 2004, but how
do
> I suppress the leading zero on the date ?
> Any help would be appreciarted
> Mark
>|||Thanks for that, I'd just discovered that you can create a function. It all
now works fine !!
Cheers
Mark
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
news:OarRSRgAEHA.808@.TK2MSFTNGP12.phx.gbl...
> You could make your own function, along these lines:
> http://www.aspfaq.com/2460
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
> "Flems" <Mark.Flemans@.apakgroup.com> wrote in message
> news:O5JaVwdAEHA.2480@.TK2MSFTNGP12.phx.gbl...
> problems
but
> do
>

No comments:

Post a Comment