Discussion Locked

Microsoft SQL Server 2000 date format

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I want to save the date without the time format i.e. dd/mm/yyyy for e.g. instead of dd/mm/yyyy hh:mm:ss am/pm

5 replies

by mark_t

Are you talking about SQL Server datetime format, or just storing the date format as dd/mm/yyyy on a table ?

Why do you need to do this ? Is it not feasible to convert the date format into the required one when displayed ?

by jmiller1

A two digit year is the closest you can get without building your own date string:

SELECT CONVERT(char(12), GETDATE(), 1)

will return 08/16/02.

See 'CAST and CONVERT' in Books Online.

This discussion is closed to new replies.