471,086 Members | 1,009 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,086 software developers and data experts.

Time part Problem

2
Dear All,
I have little query for the time part. I written following script want to fetch time.

declare @pack1_in_time datetime

select @pack1_in_time = CONVERT(CHAR(5),convert(datetime, '05:32:08 PM',126),114)
select @pack1_in_time

Result:--> 1900-01-01 17:32:00.000

Using of 114 parameter in convert function, 1900-01-01 is also coming. I want only time portion i.e. 17:32.

How it can possible ?? Please give me solution.
Thanks in advance.
Apr 26 '07 #1
0 944

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Marcus | last post: by
5 posts views Thread by sandman | last post: by
80 posts views Thread by Charles Law | last post: by
5 posts views Thread by Sinan Nalkaya | last post: by
3 posts views Thread by Satish Itty | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.