Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default convert number to date format

I have an Excel file with a Time column formatted as a general number (e.g.
830, 1102, 805). I need to convert these numbers to a time format like 8:30,
11:02, and 8:05.

I've tried =TEXT(a2,"h:mm"); however, it only returns a zero. These data
will be imported into a time formatted field in Access and later used to
determine the difference between schedule delivery time versus actual
delivery time.

Any assistance on how to convert this field would be very helpful. Thanks!
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default convert number to date format

A1=1436

in B1:

=TIME(LEFT(A1,LEN(A1)-2),RIGHT(A1,2),0)

B1 == 14:36

Format cell as hh:mm

HTH

"Lesley" wrote:

I have an Excel file with a Time column formatted as a general number (e.g.
830, 1102, 805). I need to convert these numbers to a time format like 8:30,
11:02, and 8:05.

I've tried =TEXT(a2,"h:mm"); however, it only returns a zero. These data
will be imported into a time formatted field in Access and later used to
determine the difference between schedule delivery time versus actual
delivery time.

Any assistance on how to convert this field would be very helpful. Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default convert number to date format

hi Lesley

try it:

=if(len(a2)<4,time(left(a2,1),right(a2,2),0),time( left(a2,2),right(a2,2),0))

hth
regards from Brazil
Marcelo

"Lesley" escreveu:

I have an Excel file with a Time column formatted as a general number (e.g.
830, 1102, 805). I need to convert these numbers to a time format like 8:30,
11:02, and 8:05.

I've tried =TEXT(a2,"h:mm"); however, it only returns a zero. These data
will be imported into a time formatted field in Access and later used to
determine the difference between schedule delivery time versus actual
delivery time.

Any assistance on how to convert this field would be very helpful. Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default convert number to date format

830 turns to 8 hours 30 minutes?
=--TEXT(A1,"00\:00\:\0\0")
Format as time.

Just in case....
830 turns to 8 minutes 30 seconds?
=--TEXT(A1,"00\:00\:00")
still format as time


Lesley wrote:

I have an Excel file with a Time column formatted as a general number (e.g.
830, 1102, 805). I need to convert these numbers to a time format like 8:30,
11:02, and 8:05.

I've tried =TEXT(a2,"h:mm"); however, it only returns a zero. These data
will be imported into a time formatted field in Access and later used to
determine the difference between schedule delivery time versus actual
delivery time.

Any assistance on how to convert this field would be very helpful. Thanks!


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
format a cell to accept a date or a whole number trick95 Excel Discussion (Misc queries) 1 March 4th 06 01:56 PM
Converting number or text to a Date Format samhain New Users to Excel 2 October 17th 05 02:28 PM
How can I convert a date format to an ISO week format (in EXCEL)? ELI Excel Discussion (Misc queries) 2 July 6th 05 06:31 PM
Convert degree from decimal number to the standard format (degre. Zainelabdin Excel Discussion (Misc queries) 3 March 27th 05 12:37 PM
convert number to text and format it. Goda Excel Worksheet Functions 2 February 7th 05 08:07 PM


All times are GMT +1. The time now is 12:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"