Updating with Current Timestamp



IBM's flagship relational database management system

Updating with Current Timestamp

Postby ninudvictor » Thu Feb 26, 2009 8:38 pm

Hi All,
I am trying to update a column(CARD_TS,26 bytes length) of a table with Current Timestamp from a Cobol program
by calling a subprogram which has the required query to update the table.

I am using "FUNCTION CURRENT-DATE" (21 BYTES) which gives timestamp like "200902260845+0000".
The last 5 bytes is always "+0000".
But DB2 Current Timestamp gives "2009-02-26.08.45.55.000000" (26 bytes).
[YYYY-MM-DD.HH.MM.SS.mili secs]

Could anyone please let me know how to update the CARD_TS column with 26 bytes current timestamp
including the last 6 bytes which is vital for business requirement.

As it is a client standard to use the sub program,I can not update the column using DB2 CURRENT TIMESTAMP in embeeded SQL.
So please tell me the way how to do it through a cobol program.

Regards
Ninu
ninudvictor
 
Posts: 7
Joined: Thu Oct 09, 2008 1:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Updating with Current Timestamp

Postby ninudvictor » Thu Feb 26, 2009 8:43 pm

But DB2 Current Timestamp gives "2009-02-26.08.45.55.123456" (26 bytes).
[YYYY-MM-DD.HH.MM.SS.mili secs]
The last 6 bytes is Milli Seconds which continuously changes but Cobol Function Current Date's
last 5 bytes is constant "+00000". What does this "+" signify?
ninudvictor
 
Posts: 7
Joined: Thu Oct 09, 2008 1:40 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post