Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2009
    Posts
    1

    Unanswered: Date to timestamp format

    Experts,

    I want to change the date to timestamp format in db2 udb datbase table which is running in V8.1 , Please provide me
    best possible solution .Its urgent. Please help

    thanks in advance,

  2. #2
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    timestamp_iso
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

  3. #3
    Join Date
    Oct 2007
    Posts
    246
    select timestamp(colname,'00.00.00') from tbname

    regds
    Paul

  4. #4
    Join Date
    Jul 2009
    Location
    NY
    Posts
    963
    ...timestamp(date(col1), current time)...

    example:
    select timestamp(current date, current time) from sysibm.sysdummy1
    Lenny

  5. #5
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    timestamp_iso may be the simplest. But, the schema is SYSFUN.

    DB2 UDB SQL Reference Volume 1 Version 8.2
    Chapter 3. Functions

    Functions overview

    Built-in functions are provided with the database manager; they return a single
    result value, and are identified as part of the SYSIBM schema. Built-in functions
    include column functions (such as AVG), operator functions (such as +), casting
    functions (such as DECIMAL), and others (such as SUBSTR).

    User-defined functions are registered to a database in SYSCAT.ROUTINES (using the
    CREATE FUNCTION statement). User-defined functions are never part of the
    SYSIBM schema. One such set of functions is provided with the database manager
    in a schema called SYSFUN, and another in a schema called SYSPROC.

Posting Permissions

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