February 8, 2019 at 3:08 pm
Take a look at the attached pic
@[$Project::OutPutFilePath] + @[$Project::DiagFile_MEDICAID]
The value in the variable @[$Project::DiagFile_MEDICAID] = "MEDICIAD_YYYYMMDD_HHMM.txt"
What I need from you is a syntax expression that will replace the YYYYMMDD_MMHH with the current date and time in the format specified.
February 8, 2019 at 3:12 pm
mw_sql_developer - Friday, February 8, 2019 3:08 PMTake a look at the attached pic
@[$Project::OutPutFilePath] + @[$Project::DiagFile_MEDICAID]The value in the variable @[$Project::DiagFile_MEDICAID] = "MEDICIAD_YYYYMMDD_HHMM.txt"
What I need from you is a syntax expression that will replace the YYYYMMDD_MMHH with the current date and time in the format specified.
ahh that should be DiagFile_MEDICAID
February 8, 2019 at 3:16 pm
Is the "YYYYMMDD_MMHH" part hard coded?
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 8, 2019 at 3:24 pm
Mike01 - Friday, February 8, 2019 3:16 PMIs the "YYYYMMDD_MMHH" part hard coded?
YES it is .. You just have to do a replace
February 8, 2019 at 3:28 pm
mw_sql_developer - Friday, February 8, 2019 3:24 PMMike01 - Friday, February 8, 2019 3:16 PMIs the "YYYYMMDD_MMHH" part hard coded?YES it is .. You just have to do a replace
Or just show me how to make a string variable in the YYYYMMDD_HHMM format ( and I can do the rest )
February 8, 2019 at 3:34 pm
mw_sql_developer - Friday, February 8, 2019 3:28 PMmw_sql_developer - Friday, February 8, 2019 3:24 PMMike01 - Friday, February 8, 2019 3:16 PMIs the "YYYYMMDD_MMHH" part hard coded?YES it is .. You just have to do a replace
Or just show me how to make a string variable in the YYYYMMDD_HHMM format ( and I can do the rest )
Got some done...
(DT_WSTR,4) YEAR(GETDATE()) +
RIGHT("0" + (DT_WSTR,2) MONTH(GETDATE()),2) +
RIGHT("0" + (DT_WSTR,2) DAY(GETDATE()),2) +
"_" +
Help me get the hour and minute
February 11, 2019 at 6:03 am
You can try something like this
(DT_STR,4,1252) datepart("yyyy", getdate()) + Right("0" + (DT_STR,2,1252) datepart("mm", getdate()),2) + Right("0" + (DT_STR,2,1252) datepart("dd", getdate()),2) + "_" + Right("0" + (DT_STR,2,1252) DatePart("hh",getdate()),2) + Right("0" + (DT_STR,2,1252) DatePart("mi",getdate()),2) + Right("0" + (DT_STR,4,1252) DatePart("ss",getdate()),2) + Right("000" + (DT_STR,3,1252) datepart("Ms", getdate()),3)
For better, quicker answers, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply