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 |
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2009-09-18 : 10:28:47
|
| Dear All,Select convert(datetime,convert(char(8),a.audit_date,112),103),a.asso_id,b.emp_name,count(distinct audit_no) from T1 a,T2 bwhere a.asso_id=b.useridgroup by convert(datetime,convert(char(8),a.audit_date,112),103),a.asso_id,b.emp_nameorder by convert(datetime,convert(char(8),a.audit_date,112),103),a.asso_id,b.emp_nameoutput is coming like this2008-01-02 00:00:00.000 11100 Name Name 1I want only date not this 00:00:00.000 |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-09-18 : 10:34:15
|
u just need thisconvert(varchar(10),a.audit_date,120) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-18 : 10:45:47
|
| If you want to show formatted dates in front end application, do formation thereMadhivananFailing to plan is Planning to fail |
 |
|
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2009-09-18 : 11:15:16
|
| Great Working fineThanks |
 |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-09-18 : 11:40:23
|
quote: Originally posted by sanjay5219 Great Working fineThanks
WELCOME |
 |
|
|
|
|
|
|
|