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 |
kaarthik
Starting Member
1 Post |
Posted - 2011-04-23 : 03:31:26
|
i need to bind the date and time as 04/23/2011 1:00pm plz provide the sql standard code for this fomar or give ur suggesstion thanks in advancet.k.karthi |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2011-04-23 : 06:59:40
|
Standard formatting codes for date and time are listed on this page: http://msdn.microsoft.com/en-us/library/ms187928.aspx. If none of those meet your exact requirement, you may need to compose your string for example like this:convert(varchar(32),yourDateCol,101) + ' ' + convert(varchar(32), youDateCol,108); You mentioned "bind the date". Can you explain more? Typically, if you need to bind the date that comes from the database to a UI control, you don't need to do the formatting in SQL. The control should/would allow you to do the formatting. |
 |
|
lionofdezert
Aged Yak Warrior
885 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-04-25 : 04:47:47
|
If you want to show formatted dates in front end application, do formation thereMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|