Alpha DevCon 2018
Results 1 to 2 of 2

Thread: Converting field of type Time to Character

  1. #1
    Real Name
    Rhett Scott
    Join Date
    May 2000

    Default Converting field of type Time to Character


    I have an Passive Link table hooked up to a DB2 table that contains one or more fields of type TIME. I want to append records from the Passive Link table into a second table called WORK. The WORK table contains a field of type CHARACTER that I want to hold the value of one of the TIME fields from the Passive Link table.

    I am looking for a function that will convert the TIME field value into a CHARACTER field. I can't find one. So far the only thing I have found that will work is a work around. I can EXPORT the Passive Link table data to an ASC file and then import it. The TIME fields import as CHARACTER fields. I sure would like to avoid this step.

    Thank you for your help!

  2. #2
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Michigan U.P.

    Default Re: Converting field of type Time to Character

    where are you looking? :)

    ctime() is one that will convert time to character---toward the top of the list in the help file when looking at the date and time functions.

    To get it into a specific format you may have to then check out the character functions such as substr() and concatenate it into whatever you want. May be a function to do it but didn't look beyond your question really.
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau

Similar Threads

  1. Convert character field to Time
    By dparkins in forum Alpha Five Version 8
    Replies: 38
    Last Post: 05-26-2010, 08:14 AM
  2. Replies: 1
    Last Post: 01-24-2006, 02:15 PM
  3. Character type to Time type
    By Jim Chapman in forum Alpha Five Version 5
    Replies: 7
    Last Post: 12-30-2002, 06:39 PM
  4. Character field format for Time
    By forskare in forum Alpha Five Version 4
    Replies: 3
    Last Post: 10-09-2000, 10:10 AM
  5. Converting character to a date field?
    By Howard Berg in forum Alpha Five Version 4
    Replies: 14
    Last Post: 05-11-2000, 06:30 AM

Posting Permissions

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