var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SQL Server 2000 Date Format
Can anyone tell me how can i change the datetime format in Ms SQL Server 2000.
During i insert a data from VB to Ms SQL 2000 database, my date field return me the format as "2004-06-30 14:20:31.000". My actual format need like this "Jun 30 2004 02:20:31 PM"
I have format my coding in VB as "Format(X,"dd/MMM/YYYY HH:MM S"). But this look like something wrong once the data is insert to the table.
Maybe you can create a customised datatype for your date field?
"2004-06-30 14:20:31.000" format is the default format the server saves DATETIME datatype and also depends on servers date format setting. U could write a User Defined Function to format the date as you retrieve the data in the select statement.
SQL Server does not store dates in any format. It stores them as numbers.
It is best to let the your application interface handle how the date is formatted for display, but if you must format the results in your stored procedures use the CONVERT function:
select convert(varchar(26), getdate(), 109)
select convert(varchar(19), getdate(), 100)