August 10, 2010 at 1:46 pm
Hello,
I have a date column with data type DT_DBTIMESTAMP that I am exporting to .csv. In the Flat Connection Manager the data type is correct and I can see it formatted like a TIMESTAMP in the Data Viewer as "2003-02-17 15:05:31.840000000". However in the .csv file the value is "05:31.8" (2/17/2003 3:05:32 PM). When I export to .txt I get the correct DATETIMESTAMP. Is there is reason why .csv can't deplay the TIMESTAMP?
Thanks,
MCTS: BI 2008, MCITP: BI 2008
Stay Thirsty My Friends
August 10, 2010 at 1:52 pm
What are you using to view the CSV?
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
August 10, 2010 at 2:02 pm
Excel
MCTS: BI 2008, MCITP: BI 2008
Stay Thirsty My Friends
August 10, 2010 at 2:06 pm
Excel is helpfully (:crazy:) doing the conversion for you. Try opening it in Notepad and you'll see that it's just the same as the .txt.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
August 10, 2010 at 2:41 pm
yep, that's what I figured. It's formatted properly in notepad. Thanks for taking a look.
MCTS: BI 2008, MCITP: BI 2008
Stay Thirsty My Friends
August 10, 2010 at 4:41 pm
MostInterestingMan (8/10/2010)
Hello,I have a date column with data type DT_DBTIMESTAMP that I am exporting to .csv. In the Flat Connection Manager the data type is correct and I can see it formatted like a TIMESTAMP in the Data Viewer as "2003-02-17 15:05:31.840000000". However in the .csv file the value is "05:31.8" (2/17/2003 3:05:32 PM). When I export to .txt I get the correct DATETIMESTAMP. Is there is reason why .csv can't deplay the TIMESTAMP?
Thanks,
You can avoid this by creating new excel sheet in the destination task instead of selecting predefined excel sheet. In your excel destination which you would have selected as data flow destination and click on the "new" button next to the "Name of the excel sheet". This would import the data as it is in your target.
[font="Arial"]BASKAR BV
http://geekswithblogs.net/baskibv/Default.aspx
In life, as in football, you wonβt go far unless you know where the goalposts are.[/font]
August 10, 2010 at 11:52 pm
Baskar B.V (8/10/2010)
MostInterestingMan (8/10/2010)
Hello,I have a date column with data type DT_DBTIMESTAMP that I am exporting to .csv. In the Flat Connection Manager the data type is correct and I can see it formatted like a TIMESTAMP in the Data Viewer as "2003-02-17 15:05:31.840000000". However in the .csv file the value is "05:31.8" (2/17/2003 3:05:32 PM). When I export to .txt I get the correct DATETIMESTAMP. Is there is reason why .csv can't deplay the TIMESTAMP?
Thanks,
You can avoid this by creating new excel sheet in the destination task instead of selecting predefined excel sheet. In your excel destination which you would have selected as data flow destination and click on the "new" button next to the "Name of the excel sheet". This would import the data as it is in your target.
It's a CSV export, not Excel.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
August 11, 2010 at 2:00 am
Phil Parkin (8/10/2010)
Excel is helpfully (:crazy:) doing the conversion for you. Try opening it in Notepad and you'll see that it's just the same as the .txt.
Excel always screws things up helpfully π
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
August 11, 2010 at 9:45 am
da-zero (8/11/2010)
Phil Parkin (8/10/2010)
Excel is helpfully (:crazy:) doing the conversion for you. Try opening it in Notepad and you'll see that it's just the same as the .txt.Excel always screws things up helpfully π
So we decided to have the users format those trouble fields (datetime) when they open the CSV file in Excel. I have explained to them how Excel, in all honesty, is just trying to interpret the CSV format.
Thanks for all your inputs again.
MCTS: BI 2008, MCITP: BI 2008
Stay Thirsty My Friends
August 11, 2010 at 9:55 am
Sounds like a plan.
If you export from Excel to CSV after performing this reformatting, is the formatting of the field the same as was originally output?
If not, what happens if you re-import the (Excel version) CSV - does the formatting work correctly this time with no user input?
If so, you should be able to change the formatting of your original output to match what Excel likes - then you'll have happy users π
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply