Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert number field to time field 1

Status
Not open for further replies.

mellicks

Programmer
Aug 27, 2008
11
US
I am having issues with a field in a database. The field is a number field, but it contains appointment times. For example, 800, 810, 815... 1515 mean 8am, 8:10 am, 8:15am, 3:15pm. I have to do calculations on these times now, so I'm trying to convert the number to a time and can't get it to work.

Any suggestions would be greatly appreciated!
Thanks,
mellicks
 
stringvar x := totext({table.number},"0000");
stringvar y := left(x,2)+":"+mid(x,3)+":00";
time(y)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top