Thursday, March 8, 2012

Date Format In SQL Server 2000.

Hello Sir,

I am using sql server 2000.whenever i fetch a record from as database.i have a date field in the table.it reurns the date with time.but i want only the time with a new format(Like- dd/MM/yyyy).So how can i do it. Pls help.

alok........

You can retrieve your datetime field like this:

SELECT

CONVERT(NVARCHAR(10),yourDateTimeColumn,103)as newDate FROM YourTable

No comments:

Post a Comment