|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am having an issue trying to import data from two columns in an excel sheet into a table in SQL 2000.
The two columns are in a format that I dont want changed when it is imported.
Column 2 is the time of which a call was made. I would like it to display in the 24 hour format because Crystal Reports makes a mess of the 12hour clock entries and the reports are then wrong. the current format in the excel sheet is HH:MM:SS (eg. 14:34:02). Colmn 6 is the time that the call took which is also displayed in the same format as column 2. (please see zip file attachment if it uploaded) How do i go about importing these two fields without the format changing? Basically when I try to import the data, I get an error message after it runs. The changed the default data type from 'smalldatetime' to text and to nvarchar but nothing worked. In fact the dat ended up being distorted.
Any help regarding this issue would be most appreciated.
regards
JohannL |
|
#2
|
||||
|
||||
|
You can try these formats
Code:
PRINT '2) HERE IS MM-DD-YY FORMAT ==>' + CONVERT(CHAR(8),GETDATE(),14) PRINT '2) HERE IS MM-DD-YY FORMAT ==>' + CONVERT(CHAR(20),GETDATE(),13) |
|
#3
|
|||
|
|||
|
Great Thanks Memnoch. i'll give this a go and let you know how i got on.
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Importing a 24hr time format from excel to a table in sql 2000. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|