User Profile

Collapse

Profile Sidebar

Collapse
tfrancis
tfrancis
Last Activity: Jun 14 '07, 01:42 AM
Joined: Jun 12 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • tfrancis
    replied to DB2 User Defined Function
    in DB2
    I've included my function below as it currently stands- although I suppose its part algorithm at this stage as im not sure how to implement the code correctly so it can be read within db2.

    CREATE FUNCTION timeformat(time fmt varchar(20))
    RETURNS varchar(20)
    RETURN
    year varchar(4)
    month varchar(4)
    day varchar(4)

    year = substr(timefmt, 1,4)
    month = substr(timefmt, 5,6)
    day...
    See more | Go to post

    Leave a comment:


  • tfrancis
    started a topic DB2 User Defined Function
    in DB2

    DB2 User Defined Function

    Hi all,

    I'm attempting to write a basic db2 function that converts the format of an inputted date of yyyymmddhhmm to dd/mm/yyyy. (DB2 8.1 on windows)

    My approach was to strip the characters from the inputted date into individual variables then reconstruct them as a new variable into the format dd/mm/yyyy which will then be returned from the function.
    Would this be the best approach to create this function? If...
    See more | Go to post
No activity results to display
Show More
Working...