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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Datetime Datatype

Author  Topic 

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2011-02-15 : 08:04:01
Hi,

I have a select query which works fine but in the event_date and finalEventDt, it gives the datetime such 13/06/2010 00:00:00
I want my query to neglect and ignore ignore the 00:00:00 and ONLY show 13/06/2010.
Any help please...

Code below

SELECT DISTINCT 
TOP (100) PERCENT t1.o_pat_id AS vision_patid, t1.o_pat_birth_yr AS BirthYear, t1.o_pat_curr_gender AS Sex, t2.prac_no, t2.prac_eid, t2.main_doctor,
t2.practice_name, t2.address1, t2.address2, t2.address3, t2.town, t2.county, t2.post_code, dbo.tblProjectPatients.LoadRef,
dbo.tblProjectPatients.ProjectID, dbo.tblProjectPatients.EventDt AS Event_date, dbo.tblProjectPatients.FinalEventDt, dbo.tblProjectPatients.pat_eid,
dbo.tblProjectPatients.PatCategory
FROM GPRDTech.gprdsql.TblPracDetails AS t2 INNER JOIN
ODSData5.dbo.o_pat AS t1 ON t2.prac_eid = t1.o_prac_uid INNER JOIN
dbo.tblProjectPatients ON t1.o_pat_eid = dbo.tblProjectPatients.pat_eid
ORDER BY dbo.tblProjectPatients.LoadRef, t2.prac_no


Many thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-02-15 : 08:08:21
that is formatting issue. Do it in your front end application


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -