mistektips
Programmer
Hi,
I am getting 'Type Mismatch: cdate error" when I am running this script...
Basically I am using DTS(Sql server) to transfer data...
And one of the columns is date...
Could someone suggest as to why I am getting an error?
Any help will be appreciated.
Thanks
The script is as follows:
I am getting 'Type Mismatch: cdate error" when I am running this script...
Basically I am using DTS(Sql server) to transfer data...
And one of the columns is date...
Could someone suggest as to why I am getting an error?
Any help will be appreciated.
Thanks
The script is as follows:
Code:
'**********************************************************************
' Visual Basic Transformation Script
'************************************************************************
' Copy each source column to the destination column
Function Main()
If DTSSource("A0015_ABOLISH_DATE") = "0" Then
processdatef = "01/01/1901"
Else
processdate = CStr(DTSSource("A0015_ABOLISH_DATE"))
processdatef = Mid(DTSSource("A0015_ABOLISH_DATE"), 5, 2) + "/" + Mid(DTSSource("A0015_ABOLISH_DATE"), 7, 2) + "/" + Mid(DTSSource("A0015_ABOLISH_DATE"),1,4)
End If
DTSDestination("Abolish_Date") = CDate(processdatef)
Main = DTSTransformStat_OK
End Function