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.
[code]declare @tTime table(TTime char(6));insert into @tTime values('013000');insert into @tTime values('213000');[/code]how my SQL look's like to display as follow[code]myDateTime2010-06-29 01:30:00.0002010-06-29 21:30:00.000[/code]Let's say 2010-06-29 is getdate()
quote:Originally posted by RickD Possibly Madhi, but the OPs results had hyphens.
Yes. I didn't speicify about the result. Both yours and mine resturn same result.But When you use style 120 that had hyphen with time part without Time seperator, and cast it to datetime,it may lead to error or unexpected result depending upon the date settings of the serverMadhivananFailing to plan is Planning to fail