Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB2 Timestamp Value

Status
Not open for further replies.

etan1999

Programmer
Jun 17, 2003
4
CA
Hi.

I have a table with a column defined as TIMESTAMP.

Is it possible to insert a value into this column, using
a variable PIC X(26) containing a value in DB2 format "YYYY-MM-DD-HH.MM.SS.ssssss" ?

Thanks.
 
Part of the referenceguide:


Code:
 TIMESTAMP


 A string of length 26, enclosed in single
 quotation marks. The string has the format
 yyyy-mm-dd-hh.mm.ss.nnnnnn.

    _____________________________________________________________________________________________
   | Table 6. Declarations generated by DCLGEN                                                   |
   |________________________ ____________________ _____________________________ _________________|
   | SQL Data Type(6)       | C                  | COBOL                       | PL/I            |
   |________________________|____________________|_____________________________|_________________|

...

   | TIMESTAMP              | char var[27]       | PIC X(26)                   | CHAR(26)        |
   |________________________|____________________|_____________________________|_________________|


[\CODE]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top