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.
| Author |
Topic |
|
phaze
Starting Member
42 Posts |
Posted - 2010-03-09 : 10:55:43
|
| how do i go about converting 2010-03-02 11:31:02.000 to 11:31am?could someone show me an example? |
|
|
phaze
Starting Member
42 Posts |
Posted - 2010-03-09 : 11:56:50
|
| ok a little bit more detail. the column of where my data is called is CallDate and it has this type of data in it 2010-03-02 11:27:20.000I am wanting to convert that to just the time itself plus am or pm11:27ami currently did this but it's not giving me the option of having am or pmselect convert(char(5), CallDate, 108), CallDatefrom dbo.OutboundIVR(No column name) CallDate11:27 2010-03-02 11:27:20.000 |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2010-03-09 : 12:24:21
|
| declare @date datetimeset @date = '2010-03-02 11:27:20.000'select RIGHT(convert(varchar(50),@date,100),7)JimEveryday I learn something that somebody else already knew |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-10 : 01:28:15
|
| [General advice]If you want to show formatted dates in front end application, do formation there[/General advice]MadhivananFailing to plan is Planning to fail |
 |
|
|
phaze
Starting Member
42 Posts |
Posted - 2010-03-10 : 11:55:51
|
| thank you for the help! |
 |
|
|
|
|
|