- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to update of incorrect timestamp format in a DB2 table?
As per the standard DB2 definitions, timestamp holds 10 bytes in DB2 storage and 26 bytes in corresponding COBOL storage (PIC X(26)). It is in the format YYYY-MM-DDHH. MM.SS.NNNNNN. Where,
YYYY:- Year | MM:- Month | DD:- Date | HH:- Hour | MM:- Minutes | SS:- Seconds | NNNNNN:- Milliseconds
As per the scenario given in the question, the timestamp is “2020-07-01 23:14”. Clearly, the format of the timestamp is incorrect as the correct format is YYYY-MM-DDHH. MM.SS.NNNNNN. In this case if we will try to insert this incorrectly formatted timestamp in a DB2 table column which is defined as timestamp datatype, we will get - 180 DB2 error code. The IBM documentation defines -180 error code as−
The length or string representation of a DATE, TIME, or TIMESTAMP value does not conform to any valid format.
- Related Articles
- How to update a timestamp field of a MySQL table?
- How to update DB2 table with a duplicate primary key?
- How to delete a DB2 table TAB1?
- Convert MySQL Unix-Timestamp format to date format?
- How to update a Timestamp and set to current date in MongoDB?
- How to store a NULL value in a particular column of a DB2 table using COBOL-DB2 program?
- How to get the list of all COBOL-DB2 programs using a DB2 table TAB1?
- How to update the date format in MySQL?
- How to find the primary key of a DB2 table TAB1?
- How to update all dates in a Table?
- Convert string (varchar) to timestamp format in MySQL?
- How to add a row compression to a DB2 table TAB1?
- How to find all the foreign keys of a DB2 table TAB1?
- How can you revert all the DB2 table changes done in a COBOL-DB2 program?
- How to fix the incorrect datetime value while inserting in a MySQL table?

Advertisements