TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
nishant ranjan
NA
390
0
Time format
Feb 14 2012 7:31 AM
select left(convert(varchar, online_time,109),4)+' '+ right(convert(varchar, online_time,109),2) as online_time from time
above is my query
i want output as
04:30 am 4:30 am will do(if initial 0 is removed no prob)
09:45 pm
11:15 am
my prob is that above query is giving right output for time before 10 am/pm but after 9:59 am/pm time is wrong i.e, it displays
11:3 pm instead of 11:30 pm
and give right for
4:40 pm
how i can do that
Reply
Answers (
19
)
Check Constraint in Sql Server
SQL statement for getting all tables name