1jaws
asked on
datetime format
convert(varchar, dateSubmitted, 110) as dateSubmitted just gives me date a 08/15/2011 format and I want to also see time beside the date how to do that.. tsql
If you want to see the date and time, then why use the CONVERT function at all?
You can use CONVERT(varchar(20),DateSu bmitted,0) . Look at the table in BOL to see what all the convert options do.
ASKER
I need to use such as 08/15/2011 on the date part.. shows me Aug 15 2011
Then you need to combine two:
SELECT convert(varchar(8),DateSub mitted,101 ) + ' ' + convert(varchar(5),DateSub mitted,108 )
SELECT convert(varchar(8),DateSub
ASKER
still not right... it shows me as 08/15/20
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
still need a see AM, PM also :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you ewangoya! it works.. Ok, how should I give points now? :)
At your discretion, you can split or award all points according to the relevance and correctness of the solution
ASKER
Thanks Guys!