View previous topic :: View next topic
|
Author |
Message |
sajjan jindal Warnings : 1 New User
Joined: 09 Sep 2007 Posts: 60 Location: india
|
|
|
|
33) What is the physical storage length of each of the following DB2 data types:
DATE, TIME, TIMESTAMP?
DATE: 4bytes
TIME: 3bytes
TIMESTAMP: 10bytes
34) What is the COBOL picture clause of the following DB2 data types:
DATE, TIME, TIMESTAMP?
DATE: PIC X(10)
TIME : PIC X(08)
TIMESTAMP: PIC X(26)
Date contains : YYYYMMDD, why does it require X(10) ?
same question for TIME and TIMESTAMP? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The idea behind the Interview Questions forum is that you tell us the answers that you think are correct, and other forum members will tell you if you are correct or not, or maybe offer a better answer. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
DATE, TIME, TIMESTAMP?
DATE: PIC X(10)
TIME : PIC X(08)
TIMESTAMP: PIC X(26)
Date contains : YYYYMMDD, why does it require X(10) ?
same question for TIME and TIMESTAMP?
The format of the character string returned for a date, time, or timestamp depends on the setup of DB2 for your system, and would include some punctuation. For a date it could be yyyy-mm-dd or mm/dd/yyyy or dd.mm.yyyy or some other format. |
|
Back to top |
|
|
|