Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197

    Question Unanswered: Timestamp column in UTC converted format

    hi

    I wanted to have the timestamp in my table as UTC converted timestamp

    i have created the column with a timestamp data type ,
    based on the example in the link when trying to insert as mentioned i get a error.

    And the link also shows datetime data type. which to my knowledge don exist in db2

    here is the link

    http://publib.boulder.ibm.com/infoce...rdatetime.html

    i wanted to store the data as

    insert into DB2INST1.A values ('2005-10-10T12:00:00.00 -05:30')

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by alwayssathya View Post
    i wanted to store the data as
    insert into DB2INST1.A values ('2005-10-10T12:00:00.00 -05:30')
    Time zones have been added in DB2 10; up to version 9, DB2 stores dates, times and timestamps in "local clock" times only, without the possibility to remember time zones.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  3. #3
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197
    hi, thanks for the comment

    DB2 10 is z/os ,but what im using is LUW.

    so this will not be available in DB2 9.7 ,

    is there any other way to use the TimeZone in the LUW editions ?

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by alwayssathya View Post

    is there any other way to use the TimeZone in the LUW editions ?
    Depends on your definition of "using the timezone". You can store it as a decimal value of the format "HHMMSS", then you will be able to use it in datetime calculations.

  5. #5
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197
    thanks , the question here is i wanted to store
    the timestamp in the format

    'YYYY-MM-DD HH:MMS.ssss -ZZ:ZZ'

    which should be like '2011-05-26 11:30:00.0000 -05:30'

    is there any datatype which accept this format, As the LUW information Centre shows the link of datatype 'DateTime'

    helpe me over come ....

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Loop detected; start reading from the 2nd message in this thread.

  7. #7
    Join Date
    Aug 2010
    Location
    Singapore
    Posts
    197
    good one .... thanks

Posting Permissions

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