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
 date format

Author  Topic 

sridharkota
Starting Member

1 Post

Posted - 2007-08-27 : 11:39:10
I am trying to write a query to retrieve all dates in a table in the following format(mm/dd/yyyy).I need the date in this format because it is the input to a stored procedure and the date has to be in this format. In SQL Server the date returned is in (yyyy-mm-dd:00:00)How can I achieve this?My query is as follows:
---SELECT SeminarDate, convert (varchar (12),seminardate, 101) FROM seminar.seminarlist
order by seminardate---
Any help will be appreciated.

cblythe
Starting Member

6 Posts

Posted - 2007-08-27 : 12:22:28
here is a good link for manipulating Datetime fields with SQL server.

http://www.databasejournal.com/features/mssql/article.php/2197931

Hope it helps
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-08-28 : 02:54:23
Where do you want to show formatted dates?
If you use use front end application, use format function there

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -