Class: Teradata::DateType
- Defined in:
- lib/teradata/connection.rb
Instance Attribute Summary
Attributes inherited from FieldType
#format, #name, #title, #type_code, #type_name
Instance Method Summary collapse
Methods inherited from FieldType
code_names, codes, create, #initialize, #inspect, #to_s
Constructor Details
This class inherits a constructor from Teradata::FieldType
Instance Method Details
#unmarshal(f) ⇒ Object
1008 1009 1010 1011 |
# File 'lib/teradata/connection.rb', line 1008 def unmarshal(f) d = (f.read(@length).unpack('l').first + 19000000).to_s d[0,4] + '-' + d[4,2] + '-' + d[6,2] end |