General information
Forum:
Microsoft SQL Server
Title:
Transformation using CDATE
I assume that any date form determined by ISDATE to be a valid date form should also be transformable using CDATE. The destination SQLServer7 table has a "start_date" field with datetime data type. The source is CSV text with a date form like [01/30/2000 07:17:11]. This date form results from a VFP remote view of an Oracle table, exported to CSV. It is a valid Microsoft datetime while it is in the remote view. ISDATE says it is a valid date form when using the SQL7 Query Analyzer. But when CDATE is used in my DTS transformation, it does not seem to recognize the form as valid. And the Query Analyzer does not recognize CDATE as a valid function.
I guess I have the proper syntax. From SQL BOL:
__________
Transforming Date Data
When importing data from a file to an OLE DB destination table, you may need to use the CDATE function to convert date data if the date format is in a text or character field and is not in the format required by OLE DB, which is yyyy-mm-dd hh:mm:ss:sss:
function main()
DTSDestination("Total Sales") = DTSSource("Total Sales ")
DTSDestination("DestColumnDate") = CDATE(DTSSource("SourceColumnDate"))
Main = DTSTransformStat_OK
end function
__________
Could my problem be occurring because I'm using ODBC instead of OLE DB?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only