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
 Development Tools
 ASP.NET
 Convert 24 hr format to 12 hr format

Author  Topic 

R.Prabu
Starting Member

33 Posts

Posted - 2008-08-04 : 16:33:32
Hi,


I want to convert 24 hour format to 12 hour format how to display


this my query


-- Insert statements for procedure here
SELECT PM.PropertyId, CC.MRNumber, ISNULL(PM.ApartmentNo,'') AS 'ApartmentNo', ISNULL(PM.FloorNumber,'') AS 'FloorNumber', PM.[HouseName / No], PM.[Street Line1],
ISNULL(PM.[Street Line2],'') As 'Street Line2', PM.[City / Town], PM.[County / State], CM.CountryName,
CC.ProblemDetails, CC.ProblemNature, CC.ActionTakenBy, CC.FaultCleared, PM.[Post / Zip code] As 'PostCode', PM.Country, ISNULL(PM.Latitude,'') Lat, ISNULL(PM.Longitude,'') Long,
ISNULL(PM.Phone,'') As 'PropertyPhone',ISNULL(PM.Fax,'') As 'PropertyFax', UI.UrgencyIndicator,
Convert(Varchar,CC.CallDate,107) +' '+ CONVERT(CHAR(8),CC.CallTime,8) As 'Date_Time', CC.TypeOfRequest
FROM HSSPMS_Tbl_PropertyMaster PM Inner Join HSSPMS_Tbl_Callcentre_Compliants CC On CC.PropertyId = PM.PropertyId
Inner Join HSSPMS_Tbl_UrgencyIndicatorMaster UI On UI.UrgencyIndicator_ID = CC.UrgencyIndicator
Inner Join HSSPMS_Tbl_Country CM On CM.CountryId = PM.Country
Where CC.MRNumber = @MaintenanceID

help me


Regards,
Prabu R

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2008-08-05 : 07:29:55
Do your date formatting in your asp.net code, not in your database code.


- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page
   

- Advertisement -