dbTalk Databases Forums  

Date Variable

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Date Variable in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jen
 
Posts: n/a

Default Date Variable - 04-21-2004 , 08:26 AM






Hi,
Is there a way in SQL to create a date/time variable in a
table and format the variable as "Short Date"? If yes,
can you tell me how? Thanks for your help.
Jen

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Date Variable - 04-21-2004 , 09:01 AM






Nope.

SQL Server stores DateTime datatypes in one format and one format only. To
do what you want you would have to format the output in the client. You can
use the CONVERT() function to output the DateTime attribute as a character
format.



--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jen" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,
Is there a way in SQL to create a date/time variable in a
table and format the variable as "Short Date"? If yes,
can you tell me how? Thanks for your help.
Jen



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.