hour separator from . to : ?!?!

hour separator from . to : ?!?!

Post by YURYSS » Tue, 14 Sep 2004 21:48:01

In my SQLserver DATA datatype appear to me with hour separator "."
I want that they appear with separator ":" (12:00:00) (for to prevent ODBC
(I have changed the international setting of the server... the OS time is
changed, but in the DB I always have the ".")
Any suggestions???


hour separator from . to : ?!?!

Post by Andrew J. » Tue, 14 Sep 2004 22:35:33

Is this a dattime datatype? If so it is not stored with any type of
delimiter. Internally it is stored as two Integers and it is up to the
front end to display it however they wish. So if it's displaying with a .
you need to look at your GUI or the driver being used. You can also convert
the datetime to a string with CONVERT() to display it in many different
formats. But as a pure datetime it does not have a display format. See
CONVERT() in BOL for more details.

Andrew J. Kelly SQL MVP



hour separator from . to : ?!?!

Post by Brannon Jo » Wed, 15 Sep 2004 10:06:14

If you are using the SQL Server ODBC driver, and you are using the driver to
convert from DATETIME to string (ie. binding the column as SQL_C_CHAR), then
you should be able to change the seperator characters using the Regional
settings on the client machine.




hour separator from . to : ?!?!

Post by Arun Perei » Sun, 14 Nov 2004 02:07:08

In the worst case if the above do not work you can always use Replace after
you converted it to string and return it as a string.