Class: TeradataCli::DateType
- Defined in:
- lib/teradata-cli/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 TeradataCli::FieldType
Instance Method Details
#unmarshal(f) ⇒ Object
1009 1010 1011 1012 |
# File 'lib/teradata-cli/connection.rb', line 1009 def unmarshal(f) d = (f.read(@length).unpack('l').first + 19000000).to_s d[0,4] + '-' + d[4,2] + '-' + d[6,2] end |