dbTalk Databases Forums  

Re: DTS to transform Date/Time to Date without time in Text file.

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


Discuss Re: DTS to transform Date/Time to Date without time in Text file. in the microsoft.public.sqlserver.dts forum.



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

Default Re: DTS to transform Date/Time to Date without time in Text file. - 09-17-2003 , 02:19 PM






Hi James,
Using ActiveXscript you can do this:

dateName = Right(Year(Now()), 2)
If Month(Now()) < 10 Then dateName = dateName & "0" & _
Month(Now()) Else dateName = dateName & Month(Now())
If Day(Now()) < 10 Then dateName = dateName & _
"0" & Day(Now()) Else dateName = dateName & Day(Now())
msgBox(dateName )

JFB

"James Jarupan" <James_jarupan (AT) yahoo (DOT) com> wrote

Quote:
Hi
I want to use DTS to transform Date/Time to Text File
and want to have just only date without time. How can I do
that?

Thanks you in advance.





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

Default Re: DTS to transform Date/Time to Date without time in Text file. - 09-18-2003 , 02:02 AM






If your source is SQL Server look at

CONVERT(CHAR(8),<datetime col>,103)

--

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



"JFB" <jfb2002 (AT) directvinternet (DOT) com> wrote

Quote:
Hi James,
Using ActiveXscript you can do this:

dateName = Right(Year(Now()), 2)
If Month(Now()) < 10 Then dateName = dateName & "0" & _
Month(Now()) Else dateName = dateName & Month(Now())
If Day(Now()) < 10 Then dateName = dateName & _
"0" & Day(Now()) Else dateName = dateName & Day(Now())
msgBox(dateName )

JFB

"James Jarupan" <James_jarupan (AT) yahoo (DOT) com> wrote in message
news:601801c37d2a$6ac85c40$a601280a (AT) phx (DOT) gbl...
Hi
I want to use DTS to transform Date/Time to Text File
and want to have just only date without time. How can I do
that?

Thanks you in advance.







Reply With Quote
  #3  
Old   
James Jarupan
 
Posts: n/a

Default Re: DTS to transform Date/Time to Date without time in Text file. - 09-18-2003 , 03:37 PM



Thanks you so much this help.

Thanks again
Quote:
-----Original Message-----
If your source is SQL Server look at

CONVERT(CHAR(8),<datetime col>,103)

--

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



"JFB" <jfb2002 (AT) directvinternet (DOT) com> wrote in message
news:%235IFbCVfDHA.392 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Hi James,
Using ActiveXscript you can do this:

dateName = Right(Year(Now()), 2)
If Month(Now()) < 10 Then dateName = dateName & "0" & _
Month(Now()) Else dateName = dateName & Month(Now())
If Day(Now()) < 10 Then dateName = dateName & _
"0" & Day(Now()) Else dateName = dateName & Day(Now
())
msgBox(dateName )

JFB

"James Jarupan" <James_jarupan (AT) yahoo (DOT) com> wrote in
message
news:601801c37d2a$6ac85c40$a601280a (AT) phx (DOT) gbl...
Hi
I want to use DTS to transform Date/Time to Text
File
and want to have just only date without time. How can
I do
that?

Thanks you in advance.






.


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.