Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Time Conversion (2000)

    What would be the easiest way to covert a number to an hour:minute format. The field is limited to 1 thru 2400. The problem comes in because the number could be 1 or 2 or 3 or four characters. My gues is some sort of Elseif statement. But it is beyond my expertise. I would like to take this time and thank all who have helped me in past queries. I have always recived excellent help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Time Conversion (2000)

    Say that your field is named TimeNumber. Create a new field of type Date/Time, and set the Format property to one of the time formats. Let's say you name it TimeField. Create a query based on the table, and change it into an update query. Add the TimeField field, and set the Update To row to

    TimeSerial([TimeNumber] 100, [TimeNumber] Mod 100, 0)

    Run the query and comfirm that you want to update the records.

  3. #3
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Time Conversion (2000)

    Thank you a very elegant solution. And it works equally well with a text filed as a number field.

Posting Permissions

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