swaggrK
asked on
Need to add the Time to a Date string
I have a SSIS package script that saves the files using the following string. I need to add time to this string.
Currently, it looks like this: 5-9-2016
But, I need the time to be added to the end of the date.
If Len(DatePart(DateInterval.Month, (DateTime.Now))) = 1 Then
strMonth = "0" & DatePart(DateInterval.Month, (DateTime.Now))
Else
strMonth = CStr(DatePart(DateInterval.Month, (DateTime.Now)))
End If
If Len(DatePart(DateInterval.Day, (DateTime.Now))) = 1 Then
strDay = "0" & DatePart(DateInterval.Day, (DateTime.Now))
Else
strDay = CStr(DatePart(DateInterval.Day, (DateTime.Now)))
End If
strYear = CStr(DatePart(DateInterval.Year, (DateTime.Now)))
strDate = strMonth & "-" & strDay & "-" & strYear
location = "\\NSH-MED-SCRIPT\NPR$\TPC\"
newLocation = "\Archive\" + strDate + "\"
Currently, it looks like this: 5-9-2016
But, I need the time to be added to the end of the date.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.