Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009
    Posts
    4

    Unanswered: To TimeStamp Conversion, Please Help!!

    Can someone please help me how to convert date to timestamp. For example:

    10/04/2009 to 2009-10-04 00:00:00

  2. #2
    Join Date
    May 2009
    Posts
    508
    Provided Answers: 1
    bavirisetty, check out this link (it if for DB2 LUW V9.7 since you didn't mention DB2 version or operating system) for Scalar functions - IBM DB2 9.7 for Linux, UNIX, and Windows

    Functions are your friends. read up on them and remember them when you need to do something. They are very useful.

    Specifically, look up the TIMESTAMP function.

    TIMESTAMP('2009-10-04', '00.00.00')

    There are other ways to accomplish the same task.

  3. #3
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    Quote Originally Posted by Stealth_DBA
    There are other ways to accomplish the same task.
    TIMESTAMP_ISO is another fnc.
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

  4. #4
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    DB2 9.7 for LUW supports TIMESTAMP('10/04/2009').

Posting Permissions

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