![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have created a DTS package for reading data from Excel sheet and copying them to SQL Server database. Overall it works fine. But I have a query about date conversion and would be thankful if someone can help me with the same. Here I go - In the excel sheet, there are (among other columns) two date fields. Both these fields have value like - 'Monday 11/04/05' AND 'Thursday 14/04/05' My query is - How can I convert the above value to SQL datatime in DTS package itself? Thanks in advance, Harish Mohanbabu |
#3
| |||
| |||
|
|
On the transformation line you could run some ActiveX VB script instead of a straight copy column. Something like: FormatDateTime("SOURCE") or if need be: FormatDateTime(Right("SOURCE",8)) where "SOURCE" is your source column in the Excel spreadsheet. Hope this helps "Harish Mohanbabu" wrote: Hi, I have created a DTS package for reading data from Excel sheet and copying them to SQL Server database. Overall it works fine. But I have a query about date conversion and would be thankful if someone can help me with the same. Here I go - In the excel sheet, there are (among other columns) two date fields. Both these fields have value like - 'Monday 11/04/05' AND 'Thursday 14/04/05' My query is - How can I convert the above value to SQL datatime in DTS package itself? Thanks in advance, Harish Mohanbabu |
#4
| |||
| |||
|
|
Thank you very much! That's exactly what I was looking for.... "PaulaPompey" wrote: On the transformation line you could run some ActiveX VB script instead of a straight copy column. Something like: FormatDateTime("SOURCE") or if need be: FormatDateTime(Right("SOURCE",8)) where "SOURCE" is your source column in the Excel spreadsheet. Hope this helps "Harish Mohanbabu" wrote: Hi, I have created a DTS package for reading data from Excel sheet and copying them to SQL Server database. Overall it works fine. But I have a query about date conversion and would be thankful if someone can help me with the same. Here I go - In the excel sheet, there are (among other columns) two date fields. Both these fields have value like - 'Monday 11/04/05' AND 'Thursday 14/04/05' My query is - How can I convert the above value to SQL datatime in DTS package itself? Thanks in advance, Harish Mohanbabu |
![]() |
| Thread Tools | |
| Display Modes | |
| |