Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Issue with Convert data format

Author  Topic 

kwacz23
Starting Member

44 Posts

Posted - 2013-11-15 : 03:20:11
Hi

I have

DECLARE @Period nvarchar(10)
SET @Period = CONVERT(nvarchar,'2013/1/1',112)
select @Period

I would like to receive format 20130101 but I receiving 2013/01/01

Could you help me?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-11-15 : 03:31:37
whats the base datatype of the field? '2013/1/1' is not a valid date value format in sqlserver

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -