February 1, 2011 at 5:45 pm
Hi,
I have a table with DOB in the format Sep 27 1957 12:00AM
I need to convert it into 09/27/1957
Please help.
February 1, 2011 at 5:47 pm
Use BOL and look up the available formats to the CONVERT function.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
February 1, 2011 at 5:59 pm
CAn you give an example ?
February 1, 2011 at 7:43 pm
PSB (2/1/2011)
CAn you give an example ?
Go here :
http://technet.microsoft.com/en-us/library/ms187928(SQL.90).aspx
February 1, 2011 at 11:08 pm
February 3, 2011 at 9:03 am
CAST and CONVERT in books online. There are many examples there.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
February 4, 2011 at 9:56 am
Well here you go:
select Convert(VarChar, GETDATE(), 101)
February 7, 2011 at 4:57 pm
SELECT CONVERT(CHAR(10), CONVERT(DATETIME, 'Sep 27 1957 12:00AM', 109), 101)
--Vadim R.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply