![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
sql2k sp3 Ive got a DTS package that creates a folder with the current date on it and replaces the /'s with an empty string. A small example; Function Main() dim folder folder = replace(date,"/","") msgbox folder Main = DTSTaskExecResult_Success End Function However if run today the msgbox will come up as "292004". I need for it to come back as "02092004" to fit in with alot of other stuff. Is there a way this can be done? TIA, Chris |
#3
| |||
| |||
|
|
-----Original Message----- There is a way This works for me msgbox REPLACE(CSTR(FormatDateTime( now() , 2 )),"/","") -- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. 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 "chris" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:d78901c3ef3a$2f259680$a601280a (AT) phx (DOT) gbl... sql2k sp3 Ive got a DTS package that creates a folder with the current date on it and replaces the /'s with an empty string. A small example; Function Main() dim folder folder = replace(date,"/","") msgbox folder Main = DTSTaskExecResult_Success End Function However if run today the msgbox will come up as "292004". I need for it to come back as "02092004" to fit in with alot of other stuff. Is there a way this can be done? TIA, Chris . |
![]() |
| Thread Tools | |
| Display Modes | |
| |