Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hi Guys.I'm sitting with a issue that i'm not sure how to fix.One of my Clients tables has a specific field call CALL_TIME varchar (6)DDMMYY for example todays date 120809.Is it possible to still use the DATEPART function with this field or do i need to convert it somehow?Any assistance would be appreciated.Regards.
If the format is same,declare @dt varchar(6), @dt2 datetimeset @dt = '120809'select LEFT(@dt,2) as day,substring(@dt,3,2) as month,right(@dt,2) as yearMadhivananFailing to plan is Planning to fail