smalldatetime format

  • Hi,

    I have databases where i have to insert a date value with the format:

    format (now, "yyyy-mm-dd hh:mm:ss")

    Other databases i have to insert a date format like this:

    format (now, "dd-mm-yyyy hh:mm:ss")

    Can someone explain why?

    Thank you

  • It may be because the collation of the databases are different, one being say UK one being US, and the date is being entered not by a date field but by a text field so it needs to be formatted in the correct date format for the database. If the value was being inserted as a date correctly then the collation shouldn't make a difference, the database should handle it.

    Facts are stubborn things, but statistics are more pliable - Mark Twain
    Carolyn
    SQLServerSpecialists[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply