Which data type for time interval? -
04-26-2007
, 01:51 PM
What is the best data type for time intervals? I have a CSV file that
I want to import using DTS. col4 in the data sample below represents
time intervals (hh:mm:ss.milliseconds) I am free to define the table
in any way. Thus far I have tried varchar for all columns, varchar for
col1, col2, datetime for col3, col4. DTS imports the varchar and
calendar date data fine however adds a calendar date and AM/PM to the
time interval. If I define col4 as (var)char data then Crystal Reports
does not allow me to process it arithmetically (i.e. sum, average,
etc.).
HWA,,4/20/2007,01:30.30
HWA,,4/21/2007,0.17
HWA,,4/22/2007,0.18
HWA,,4/23/2007,01:32.00
HWA,,4/24/2007,01:44.60
HWA,,4/25/2007,12.28
HWB,,4/24/2007,4.60
HWC,,4/20/2007,55.55
HWC,,4/23/2007,01:22.30
regards,
tim |