Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

smalldatetime format Expand / Collapse
Author
Message
Posted Wednesday, May 19, 2010 3:21 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 8:08 AM
Points: 744, Visits: 1,056
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
Post #924137
Posted Wednesday, May 19, 2010 3:26 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Today @ 10:15 AM
Points: 1,458, Visits: 3,005
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
Post #924142
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse