Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2010
    Posts
    3

    Unanswered: BCP out date format

    Hi,
    I use bcp out to output table data to a file but I have a problem with date and number formats. I want to understand what creates these formats and is it possible to change these.

    bcp mydb.dbo.mytable out data_3004_3004.dat -c -t~!~ -r~_!_~ -SASOS -UMYUSR -PMYPASS

    To be more specific about what I need
    1-)Date columns has a format like "Oct 22 2000 12:00:00:000AM" I want to understand what creates "Oct" part in the format because it is language specific so there has to be a way to change this I think.
    2-)Also number columns has "." for before their decimal parts, I don't have a problem with that but I want to understand why it is so, if it is language specific it might turn into "," next time I change language settings

    Thanks in advance

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    You can make a view on that table in which you convert the date to another format (like 22/08.2000 12:00:00:000AM ).

    BCP itself does not have this functionality as far as I know.
    I'm not crazy, I'm an aeroplane!

  3. #3
    Join Date
    Jul 2010
    Posts
    3
    creating a view might be solution but, I think there should be another solution.

    What is exactly causing English month names?

  4. #4
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    Quote Originally Posted by cankaya View Post
    creating a view might be solution but, I think there should be another solution.

    What is exactly causing English month names?
    English is the default language in Sybase. You could try installing a different language. That might give you translated monthnames, but it would still be in the same format.
    I'm not crazy, I'm an aeroplane!

  5. #5
    Join Date
    Jul 2010
    Posts
    3
    Ok, thanks.
    I guess I have no choice but to use view

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •