dbTalk Databases Forums  

syntax for two char '02' from (DT_WSTR,2) DATEPART("dd",getdate())

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


Discuss syntax for two char '02' from (DT_WSTR,2) DATEPART("dd",getdate()) in the microsoft.public.sqlserver.dts forum.



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

Default syntax for two char '02' from (DT_WSTR,2) DATEPART("dd",getdate()) - 11-02-2006 , 04:15 PM






Is the cast operator is intended to return two characters or up to two
characters?
How can I change it so it will return 02 instead of just 2?

According the help file DT_WSTR is A null-terminated Unicode character
string with a maximum length of 4000 characters. So what does the ",2"
do?

Would you recommend that I use
Convert.ToString(DATEPART("dd",GETDATE()) instead of the cast?
Why is one preferred over the other?
Does the Convert.ToString create unicode strings?


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.