How to capture current timestamp in ssis package 2016
I declared a variable and using expression but milliseconds are missing
@currenttimestamp = (DT_WSTR,50)(DT_DBTIMESTAMP)@[System::StartTime]
I want the milliseconds too
Thanks
How to capture current timestamp in ssis package 2016
I declared a variable and using expression but milliseconds are missing
@currenttimestamp = (DT_WSTR,50)(DT_DBTIMESTAMP)@[System::StartTime]
I want the milliseconds too
Thanks
The issue was solved when casting to (DT_DBTIMESTAMP2,3)
:
(DT_WSTR,50)(DT_DBTIMESTAMP2,3)GETDATE()
but the time get changes as it using the getdate() asit returns the current time, I need the package start time I used the following
(DT_WSTR,50)(DT_DBTIMESTAMP2,3)@[System::StartTime]
but the milliseconds is coming as .000
Do i have to use the getdate() in ExecuteSQLTask and assign that value to a string variable. I am new to ssis please give suggestions.
Use the below comand in the Execute SQL Task at the begining of the package that will give you the exact start time of the package.
SELECT CAST(GETDATE() as datetime2(6)) 'Date';