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

Thread: converting a character field to a shorttime field in an update operation

  1. #1
    Member
    Real Name
    Brad Steinfeldt
    Join Date
    Feb 2002
    Location
    Murray, Utah
    Posts
    108

    Default converting a character field to a shorttime field in an update operation

    I want to update a shortime field (temp_sch_time) from a character field (sch_time).
    It converts fine in the expression (see the attached file), but when I move from the cell, I get this error:
    The value in this cell must be of the same type as the value in the field column.
    I tried to run in directly but got the same problem.
    I tried converting the expression to this-- ctot("'"+sch_time+"'"), but that didn't work either.
    What am i doing wrong? Any ideas?

    Another weird thing was the "temp_sch_time" field is missing as a selection when using the create new operation genie.

  2. #2
    Member
    Real Name
    Brad Steinfeldt
    Join Date
    Feb 2002
    Location
    Murray, Utah
    Posts
    108

    Default Is it a bug?

    I did it with xbasic code like this, and it worked fine.
    Does that mean there's a bug?

    Code:
    prosp = table.open("prospect")
    prosp.fetch_first()
    
    while .not. prosp.fetch_eof()
    	prosp.change_begin()
    	prosp.Temp_sch_time = ctot(prosp.SCH_TIME)
    	prosp.change_end()
    	prosp.fetch_next()
    end while
    prosp.close()

Similar Threads

  1. update Logical Field from Date Field
    By John Burke in forum Alpha Five Version 5
    Replies: 13
    Last Post: 05-05-2005, 11:22 AM
  2. import a numeric field into a character field
    By dcorcoran in forum Alpha Five Version 6
    Replies: 5
    Last Post: 04-02-2005, 09:44 AM
  3. Transform character field to date field, how ?
    By mronck in forum Alpha Five Version 5
    Replies: 9
    Last Post: 11-11-2003, 12:38 PM
  4. Update Record Operation - child table field
    By C Croscutt in forum Alpha Five Version 5
    Replies: 4
    Last Post: 02-04-2003, 04:42 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
  •