Milliseconds dropped in Datetime fields

Milliseconds dropped in Datetime fields

Post by Arun » Sun, 27 Oct 2002 02:41:19



Hi,

While inserting records from SQL2K to SQL2K using the DDQ task, the
milliseconds are not carrying over for datetime fields. For example,
'2002-10-24 03:04:37.010' is being transferred as '2002-10-24 03:04:37.000'.
How can I get thedatetime field to be inserted as-is?

Thanks in advance.

 
 
 

Milliseconds dropped in Datetime fields

Post by Markus E?may » Fri, 07 Mar 2003 21:37:25


Hi,

I have the same problem.
I used a SQL command to dynamically create the
DTSDestination("column") = DTSSource("column")
lines. Then I executed the whole thing, but the
microseconds were dropped.
I tried to specify the column-assignment directly without
using the transformation script and i worked.

Isn't there a way to get the script copy microseconds as well?

Max



Quote:> Hi,

> While inserting records from SQL2K to SQL2K using the DDQ task, the
> milliseconds are not carrying over for datetime fields. For example,
> '2002-10-24 03:04:37.010' is being transferred as '2002-10-24
03:04:37.000'.
> How can I get thedatetime field to be inserted as-is?

> Thanks in advance.


 
 
 

Milliseconds dropped in Datetime fields

Post by Allan Mitchel » Fri, 07 Mar 2003 22:18:13


Hello, Markus!

Are the two columns the same datatype i.e

CREATE TABLE DTCompare (smallDT smalldatetime, LargeDT datetime)
GO
INSERT DTCompare VALUES(Getdate(),Getdate())

select * from DTCompare

This shows that the smalldatetime will drop the milliseconds.

I have just tried a DATETIME column copy to a DATETIME field and it took the
milliseconds

--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

: I have the same problem.
: I used a SQL command to dynamically create the
: DTSDestination("column") = DTSSource("column")
: lines. Then I executed the whole thing, but the
: microseconds were dropped.
: I tried to specify the column-assignment directly without
: using the transformation script and i worked.

: Isn't there a way to get the script copy microseconds as well?

: Max



??>> Hi,
??>>
??>> While inserting records from SQL2K to SQL2K using the DDQ task, the
??>> milliseconds are not carrying over for datetime fields. For example,
??>> '2002-10-24 03:04:37.010' is being transferred as '2002-10-24
: 03:04:37.000'.
??>> How can I get thedatetime field to be inserted as-is?
??>>
      ---  Microsoft Outlook Express 6.00.2800.1106

 
 
 

Milliseconds dropped in Datetime fields

Post by Markus E?may » Sat, 19 Apr 2003 17:43:30


Hello Allan,
both columns were the same type -> datetime
did you use DTSDestination("column") = DTSSource("column") to copy the
values?
i mean, you activated the use of a script instead of let DTS do the copy
with it's own mechanism.

Max



> Hello, Markus!

> Are the two columns the same datatype i.e

> CREATE TABLE DTCompare (smallDT smalldatetime, LargeDT datetime)
> GO
> INSERT DTCompare VALUES(Getdate(),Getdate())

> select * from DTCompare

> This shows that the smalldatetime will drop the milliseconds.

> I have just tried a DATETIME column copy to a DATETIME field and it took
the
> milliseconds

> --

> Allan Mitchell (Microsoft SQL Server MVP)
> MCSE,MCDBA
> www.SQLDTS.com
> I support PASS - the definitive, global community
> for SQL Server professionals - http://www.sqlpass.org

> : I have the same problem.
> : I used a SQL command to dynamically create the
> : DTSDestination("column") = DTSSource("column")
> : lines. Then I executed the whole thing, but the
> : microseconds were dropped.
> : I tried to specify the column-assignment directly without
> : using the transformation script and i worked.

> : Isn't there a way to get the script copy microseconds as well?

> : Max



> ??>> Hi,
> ??>>
> ??>> While inserting records from SQL2K to SQL2K using the DDQ task, the
> ??>> milliseconds are not carrying over for datetime fields. For example,
> ??>> '2002-10-24 03:04:37.010' is being transferred as '2002-10-24
> : 03:04:37.000'.
> ??>> How can I get thedatetime field to be inserted as-is?
> ??>>
>       ---  Microsoft Outlook Express 6.00.2800.1106