November 27, 2019 at 4:47 pm
i have an expression
@[User::SharePath] +"\\"+ Replace(Replace(Replace(Replace( @[User::FileName],".","_"+Substring((DT_WSTR,50) GETDATE(),1,19)+"."),"-",""),":","")," ","_")
the file will be generated as below DetailRecords_20191127_113247.xlsx
i want to remove underscore in between date and timestamp. final output should be DetailRecords_20191127113247.xlsx
November 27, 2019 at 4:53 pm
Looks easy enough. Did you try?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
November 27, 2019 at 4:59 pm
If you don't want underscores in your final value, why are you replacing " "
with "_"
? That's like saying you don't want a blue car, you want a red car, and when offered the choice of a blue or red car, you choose the blue car.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
November 27, 2019 at 4:59 pm
tried, giving invalid token errors
November 27, 2019 at 5:47 pm
Change the end of the statement from ," ","_") to:
," ","")
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
November 27, 2019 at 6:19 pm
ty, it worked
November 27, 2019 at 7:23 pm
You're welcome. Thanks for the confirmation!
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply