Home > Net >  How to take number input and convert to time in excel
How to take number input and convert to time in excel

Time:01-06

I am making an airplane reservation system on java. i got a sample database from online. only problem i have is the way the time is inputted.

enter image description here

and some times are 917. there is no 0 so i cannot just try and put a semicolon after 2 spaces.

Any one know if their is a way to do this, or some work around.

CodePudding user response:

You can use the following formula:

=TIME(LEFT(A2,LEN(A2)-2),RIGHT(A2,2),)

A2 = the arrival time cell that you want to convert.

Also, make sure to change your output column to whatever time format you're looking for. Screenshot of results in action included.

Formula to convert 3 or 4 digit number to time format

CodePudding user response:

You can try:

=--TEXT(A1,"00\:00")

and format the result as "Time"

enter image description here

  •  Tags:  
  • Related