dbTalk Databases Forums  

Format Date for Output to Text File

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


Discuss Format Date for Output to Text File in the microsoft.public.sqlserver.dts forum.



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

Default Format Date for Output to Text File - 05-02-2005 , 12:54 PM






What's the best method for formatting a date from a standard SQL Server
datetime format to ddmmmyyyy (e.g., 12DEC2005) in an export query?

Thanks,
Rob

Reply With Quote
  #2  
Old   
Alejandro Mesa
 
Posts: n/a

Default RE: Format Date for Output to Text File - 05-02-2005 , 02:11 PM






See function convert in BOL.

Example:

select replace(convert(varchar(11), getdate(), 113), ' ', '')
go


AMB

"Robert Hamilton" wrote:

Quote:
What's the best method for formatting a date from a standard SQL Server
datetime format to ddmmmyyyy (e.g., 12DEC2005) in an export query?

Thanks,
Rob

Reply With Quote
  #3  
Old   
Robert Hamilton
 
Posts: n/a

Default RE: Format Date for Output to Text File - 05-02-2005 , 03:13 PM



Thanks!

"Robert Hamilton" wrote:

Quote:
What's the best method for formatting a date from a standard SQL Server
datetime format to ddmmmyyyy (e.g., 12DEC2005) in an export query?

Thanks,
Rob

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.