March 4, 2013 at 3:16 am
Dear,
I want to find the time portion from the following string.
"Feb 18 2013 3:35PM"
please tell me the T-SQL to retrieve '3:35PM' as result
Thanks in advance
March 4, 2013 at 3:38 am
select convert(varchar, cast('Feb 18 2013 3:35PM' as time), 100)
---------------------------------------------------------
It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
David Edwards - Media lens[/url]
Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
Howard Zinn
March 4, 2013 at 4:15 am
SUBSTRING ( expression ,start , length )
SELECT SUBSTRING( 'Feb 18 2013 3:35PM', LEN('Feb 18 2013 3:35PM')-7, 6)
March 4, 2013 at 5:13 am
SELECT RIGHT('Feb 18 2013 3:35PM',7)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply