How i Can format Date in Sql Server 7.0
-
When iam extracting a date from SQL Svr 7 and i want it to be in a specific format, isn't there a SQL command that will do the formatting? system date '2004-06-09 13:43:41.363' i want this date in 'mm\dd\yy' format If so, could you give me the syntax and the associated style codes. Thanks syed saba
-
When iam extracting a date from SQL Svr 7 and i want it to be in a specific format, isn't there a SQL command that will do the formatting? system date '2004-06-09 13:43:41.363' i want this date in 'mm\dd\yy' format If so, could you give me the syntax and the associated style codes. Thanks syed saba
this works on 2000 check it on 7 :
select convert(varchar(10),DateValue,1)
-
this works on 2000 check it on 7 :
select convert(varchar(10),DateValue,1)
I concur with hspc. There are about 20 options for formatting the date. Look at the help on convert in SQL which will give you the parameters and examples. Michael I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious. Vince Lombardi (1913-1970)