Tuesday, October 9, 2012

Difference between timestamp(0) and timestamp(6)


TIMESTAMP types are imported and exported in record and indicator modes as
CHARACTER data using the ANSI format string and the site-defined client character set.

The basic form of TIMESTAMP is TIMESTAMP (0) which is represented as CHAR (19) in ANSI string with format (YYYY-MM-DD HH:MI:SS)

Other more precise time stamps can be represented as  TIMESTAMP(n), Where n= 1 to 6 is represented in CHAR (20+n). this can be used to store fraction of seconds data (i.e. miliseconds of data can be stored).


Hence TIMESTAMP (6) is represented as CHAR (26)
and TIMESTAMP(6) can be formated in ANSI Character string as YYYY-MM-DDbHH:MI:SS.ssssss.



No comments:

Post a Comment