Alpha Video Training
Results 1 to 2 of 2

Thread: Changing date to character

  1. #1

    Default Changing date to character

    Good Afternoon,

    Below is a code from learning xdialog for displaying records from a table. My question is regarding the listbox displaying records lastnames.

    I am wanting to build a similar dialog but instead of displaying character values I would like to display values from a date field. I have found you cannot show dates in a listbox. So my question is where would i put the function dtoc(Cleaning date).

    Thanks for the help,


    table_name = a5.Get_Path()+chr(92)+"clients.dbf"
    dim rec[1000] as p

    dim i as n
    i = 1




    Lastname: | {text=30:rec[i].lastname};
    Firstname: | {text=30:rec[i].firstname};
    Phone: | {text=30:rec[i].phone};
    Address 1: | {text=30:rec[i].address1 };
    Address 2: | {text=30:rec[i].address2 };
    City: | {text=30:rec[i].city };
    State: | {text=30:rec[i].state };
    Zip: | {text=30:rec[i].zip };
    %dlg%, 1 then
    i = i - 1
    end if
    case a_dlg_button = "next"
    if i rec.first_empty("lastname") - 1 then
    i = rec.first_empty("lastname") - 1

    end if
    end if

    if a_dlg_button = "lastname_changed" then
    rec[i].lastname = rec[i].lastname
    a_dlg_button = ""

    end if


  2. #2
    "Certified" Alphaholic Scott Emerick's Avatar
    Real Name
    Scott Emerick
    Join Date
    Dec 2000
    Central Virginia/ North Carolina Border

    Default RE: Changing date to character


    Use the action scripting genie and create a xdialog "Record List - List Box"

    Then look at the code the genie creates.

    This handles a date field just fine.

    Hope this helps.


Similar Threads

  1. Character to date conversion
    By Stan Mathews in forum Alpha Five Version 6
    Replies: 18
    Last Post: 06-21-2005, 06:42 AM
  2. character to date convert
    By Walter in forum Alpha Five Version 5
    Replies: 11
    Last Post: 04-23-2004, 01:27 AM
  3. Character string to date
    By David Farr in forum Alpha Five Version 5
    Replies: 2
    Last Post: 04-17-2003, 11:56 AM
  4. Changing character to date
    By USER in forum Alpha Five Version 4
    Replies: 4
    Last Post: 07-09-2002, 06:34 AM
  5. Formatting a character date field
    By Frank Lucenti in forum Alpha Five Version 4
    Replies: 4
    Last Post: 05-23-2002, 02:45 PM


Posting Permissions

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