.

Friday, July 4, 2008

HOW TO CHANGE DATE FORMAT OF CRYSTAL REPORT FIELD FROM ASP.NET

SELECT Lower(CONVERT(VARCHAR,GETDATE(),100)) -- May 23 2007 6:00PM

SELECT CONVERT(VARCHAR,GETDATE(),101) -- 05/23/2007

SELECT CONVERT(VARCHAR,GETDATE(),102) -- 2007.05.23

SELECT CONVERT(VARCHAR,GETDATE(),103) -- 23/05/2007

SELECT CONVERT(VARCHAR,GETDATE(),104) -- 23.05.2007

SELECT CONVERT(VARCHAR,GETDATE(),105) -- 23-05-2007

SELECT CONVERT(VARCHAR,GETDATE(),106) -- 23 May 2007

SELECT CONVERT(VARCHAR,GETDATE(),107) -- May 23, 2007

SELECT CONVERT(VARCHAR,GETDATE(),108) -- 18:02:03

SELECT CONVERT(VARCHAR,GETDATE(),109) -- May 23 2007 6:02:28:177PM

SELECT CONVERT(VARCHAR,GETDATE(),110) -- 05-23-2007

SELECT CONVERT(VARCHAR,GETDATE(),111) -- 2007/05/23

SELECT CONVERT(VARCHAR,GETDATE(),112) -- 20070523

SELECT CONVERT(VARCHAR,GETDATE(),113) -- 23 May 2007 18:02:51:850

SELECT CONVERT(VARCHAR,GETDATE(),114) -- 18:02:57:083

SELECT CONVERT(VARCHAR,GETutcDATE()),114) -- 18:02:57:083

SELECT CONVERT(VARCHAR,GETDATE()),114) -- 18:02:57:083

SELECT DATEPART(HOUR,CONVERT(VARCHAR,HOUR(GETDATE()),109)) -- 18:02:57:083

No comments:

.