Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Format in SQL?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GoodMorningSky
Junior Member

122 Posts

Posted - 25 September 2003 :  18:28:35  Show Profile
Can I format Date in Sql query of Sql Server?

this retrun full date like 9/1/2002 00:00:00
SELECT POSDATE AS [Date],

but I need short date form like 9/1/2002
I need like following (but, it doesn't work as all know^^)
SELECT Format(POSDATE, 'mm/dd/yy')
Does it have this kind of query without using Format function in code?
Thannk you..

Software Engineer.
MCSD.NET, SCWCD

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 25 September 2003 :  18:31:52  Show Profile
you will have to execute the query first and then format the results.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 25 September 2003 :  18:43:22  Show Profile  Visit D3mon's Homepage
select convert(varchar,POSDATE,101)
from mytable



Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07