February 21, 2011 at 3:19 am
Hi All
Maybe very easy 1 this, On my PC I always have the regional settings, set to yyyy/mm/dd, now the SSIS pacakge might be run on a different PC as well, with regional settings set to maybe mm-dd-yyyy.
In my script I want to rename a text file and then move it to the archive folder.
If the reginal settings is set to the second version I'm going to land up with a file where the format is going to be "mmddyyyy file.txt"
How can I ensure that the date will be in the yyyymmdd format, seeing that in SQL server I can use the convert function with parameter 121 but I cant seem to find anything for SSIS script component
I'm using
sDate = Replace(Convert.ToString(Today()), "/", "")
to return the string of date
February 21, 2011 at 4:10 am
Duplicate post. No replies to this thread please. Direct replies to http://www.sqlservercentral.com/Forums/Topic1066996-148-1.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply