Get a Jumpstart with our Sample Apps
Results 1 to 2 of 2

Thread: Converting field of type Time to Character

  1. #1
    Member
    Real Name
    Rhett Scott
    Join Date
    May 2000
    Posts
    125

    Default Converting field of type Time to Character

    Hi,

    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
    Location
    Michigan U.P.
    Posts
    5,903

    Default Re: Converting field of type Time to Character

    Rhett,
    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.
    http://support.alphasoftware.com/alp..._Functions.htm

    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.
    Mike
    __________________________________________
    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, 09:14 AM
  2. Replies: 1
    Last Post: 01-24-2006, 03:15 PM
  3. Character type to Time type
    By Jim Chapman in forum Alpha Five Version 5
    Replies: 7
    Last Post: 12-30-2002, 07:39 PM
  4. Character field format for Time
    By forskare in forum Alpha Five Version 4
    Replies: 3
    Last Post: 10-09-2000, 11: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, 07: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
  •