diff --git a/lib/active_record/connection_adapters/sqlserver_adapter.rb b/lib/active_record/connection_adapters/sqlserver_adapter.rb
index <HASH>..<HASH> 100644
--- a/lib/active_record/connection_adapters/sqlserver_adapter.rb
+++ b/lib/active_record/connection_adapters/sqlserver_adapter.rb
@@ -87,6 +87,8 @@ module ActiveRecord
       def type_cast(value)
         if value && type == :string && is_utf8?
           self.class.string_to_utf8_encoding(value)
+        elsif value && type == :timestamp
+          "0x#{value}"
         else
           super
         end
Add binary timestamp datatype handling.