myLittleTools Community Forum
»
myLittleAdmin For SQL Server (2005, 2008, 2012)
»
Support Queries
»
retrieving date in certain format in SELECT query
|
Rank: Newbie Groups: Member
Joined: 4/28/2011 Posts: 2 Points: 12
|
my table inserts a date as "5/17/2011 12:00:00 AM", which is the way the SELECT query returns it. How is the best way to retrieve it as "5/17/2011"? Do I format the SELECT syntax somehow?
|
|
Rank: Administration Groups: Administration
Joined: 9/11/2006 Posts: 605 Points: 649 Location: Enghien Les Bains, France
|
DATETIME datatype stores both date and time.
If you're using SQL Server 2008+, then you can use the datatype DATE (that only stores date).
|
|
Guest |
myLittleTools Community Forum
»
myLittleAdmin For SQL Server (2005, 2008, 2012)
»
Support Queries
»
retrieving date in certain format in SELECT query
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
|
Main Forum RSS :
Theme created by myLittleTools
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.