User Profile

Collapse

Profile Sidebar

Collapse
eurohaus33
eurohaus33
Last Activity: Jan 15 '16, 09:45 PM
Joined: Jan 14 '16
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • eurohaus33
    replied to SQL Converting decimal type to date type
    in DB2
    Hi Rabbit,

    I should have clarified I do not need to reformat the data to MM/DD/YYYY but rather convert the decimal data type to a date datatype.

    I am trying to add/subtract days to the data like the example below.

    SELECT VARCHAR_FORMAT( CURRENT TIMESTAMP + 10 DAYS,
    'YYYYMMDD')

    So far I have been able to do CAST to convert to string. I'm stuck at convert the string to a date dataype....
    See more | Go to post

    Leave a comment:


  • eurohaus33
    started a topic SQL Converting decimal type to date type
    in DB2

    SQL Converting decimal type to date type

    Hello,

    I'm trying to convert a decimal (9,0) to date from a db2 table

    20150105 would be 01/05/2015
    20160202 would be 02/02/2015
    YYYYMMDD


    not sure why its setup as 9 versus 8.

    Would these values have a 0 in front since its setup for 9?

    The reason is I need to calculate date ranges and I cannot simply add/subtract a number on this value for beginning/end...
    See more | Go to post
No activity results to display
Show More
Working...