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 |
|
asm
Posting Yak Master
140 Posts |
Posted - 2009-05-18 : 02:54:31
|
| Hi,I am using SQL 2008.how can i change the date format in query to display data in british query:-Select VoucherNo, Voucherdate, CONVERT(Date,VoucherDate,103) AS NewVoucherDateFormat From Ledger |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-05-18 : 03:00:30
|
| What is the datatype of VoucherDate? If it is a datetime field, use CONVERT(varchar(10),VoucherDate,103)else try using CONVERT(varchar(10),convert(datetime,VoucherDate),103) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-19 : 10:27:18
|
| you should be trying to do this at your front end. formatting is a front end issue where you'll have lots of functions available for this. you dont need to change actual table data just for sake of formatting it. |
 |
|
|
|
|
|