Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2005
    Location
    USA
    Posts
    130

    Date and Time Concatenation

    Hi,
    I have a table that have two columns to store date and time. Date column defined as Date data type where as Time column defined as CHAR(4). We would like to alter the table for an additional column with TIMESTAMP data type. The data to the new column should be populated from exisitng date and time columns. Is there any way Can I do using SQL to poulate the data into this column.

    Table
    COL1 DATE
    COL2 CHAR(4)
    COL3
    --
    NEWCOL TIMESTAMP.

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,452
    TIMESTAMP function accept "valid string representation of a time" for the second argument,
    if the first argument was a DATE or a valid string representation of a date.

    See Information Center.
    TIMESTAMP - IBM DB2 9.7 for Linux, UNIX, and Windows

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •