Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Excel AM/PM Formatting

Hi

I have a Crystal Reporting database that generates sign in and sign out
times for call centre staff, which I can export into Excel. The problem
is that once the time exceeds 12 noon it formats it as PM (in the
12hour clock format) instead of PM in the 24hours clock format.

Eg.
Sign In time Sign Out Time

09:47:13AM 01:45:01PM

How can I get excel to convert this time (as above) to show 13:45:01

Any help would be gratefully received.

Thanks

Coolkat

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Excel AM/PM Formatting

I'm betting that those entries aren't really times. Excel sees them as strings.

Is select the range to fix and
edit|Replace
what: AM
with: _AM (where _ represents a space)
replace all

And do the same thing with PM and _PM.

Once you do that, excel will see them as times and you can format the cells as
hh:mm:ss to get the format you want.

wrote:

Hi

I have a Crystal Reporting database that generates sign in and sign out
times for call centre staff, which I can export into Excel. The problem
is that once the time exceeds 12 noon it formats it as PM (in the
12hour clock format) instead of PM in the 24hours clock format.

Eg.
Sign In time Sign Out Time

09:47:13AM 01:45:01PM

How can I get excel to convert this time (as above) to show 13:45:01

Any help would be gratefully received.

Thanks

Coolkat


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 329
Default Excel AM/PM Formatting

Hi Coolkat,

Provided there's a space between the time and the AM/PM, Excel's TIMEVALUE
function will convert a '01:45:01 PM' string to a value that Excel can
interpret as a time. For example:
=TIMEVALUE(A1)

If your imported data lacks the required space, a SUBSTITUTE function can
fix that. For example:
=TIMEVALUE(SUBSTITUTE(SUBSTITUTE(A1,"AM"," AM"),"PM"," PM"))

In either case, you can then format the result to display as '13:45:01' via
Format|Cells|Time.

Cheers

--
macropod
[MVP - Microsoft Word]


wrote in message
oups.com...
Hi

I have a Crystal Reporting database that generates sign in and sign out
times for call centre staff, which I can export into Excel. The problem
is that once the time exceeds 12 noon it formats it as PM (in the
12hour clock format) instead of PM in the 24hours clock format.

Eg.
Sign In time Sign Out Time

09:47:13AM 01:45:01PM

How can I get excel to convert this time (as above) to show 13:45:01

Any help would be gratefully received.

Thanks

Coolkat



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 174
Default Excel AM/PM Formatting

You can convert

01:45:01PM in cell A1

to a time with

=REPLACE(A1,9,0," ")+0

format as hh:mm:ss

"macropod" wrote:

Hi Coolkat,

Provided there's a space between the time and the AM/PM, Excel's TIMEVALUE
function will convert a '01:45:01 PM' string to a value that Excel can
interpret as a time. For example:
=TIMEVALUE(A1)

If your imported data lacks the required space, a SUBSTITUTE function can
fix that. For example:
=TIMEVALUE(SUBSTITUTE(SUBSTITUTE(A1,"AM"," AM"),"PM"," PM"))

In either case, you can then format the result to display as '13:45:01' via
Format|Cells|Time.

Cheers

--
macropod
[MVP - Microsoft Word]


wrote in message
oups.com...
Hi

I have a Crystal Reporting database that generates sign in and sign out
times for call centre staff, which I can export into Excel. The problem
is that once the time exceeds 12 noon it formats it as PM (in the
12hour clock format) instead of PM in the 24hours clock format.

Eg.
Sign In time Sign Out Time

09:47:13AM 01:45:01PM

How can I get excel to convert this time (as above) to show 13:45:01

Any help would be gratefully received.

Thanks

Coolkat




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 329
Default Excel AM/PM Formatting

Touché!

--
macropod
[MVP - Microsoft Word]


"daddylonglegs" wrote in message
...
You can convert

01:45:01PM in cell A1

to a time with

=REPLACE(A1,9,0," ")+0

format as hh:mm:ss

"macropod" wrote:

Hi Coolkat,

Provided there's a space between the time and the AM/PM, Excel's

TIMEVALUE
function will convert a '01:45:01 PM' string to a value that Excel can
interpret as a time. For example:
=TIMEVALUE(A1)

If your imported data lacks the required space, a SUBSTITUTE function

can
fix that. For example:
=TIMEVALUE(SUBSTITUTE(SUBSTITUTE(A1,"AM"," AM"),"PM"," PM"))

In either case, you can then format the result to display as '13:45:01'

via
Format|Cells|Time.

Cheers

--
macropod
[MVP - Microsoft Word]


wrote in message
oups.com...
Hi

I have a Crystal Reporting database that generates sign in and sign

out
times for call centre staff, which I can export into Excel. The

problem
is that once the time exceeds 12 noon it formats it as PM (in the
12hour clock format) instead of PM in the 24hours clock format.

Eg.
Sign In time Sign Out Time

09:47:13AM 01:45:01PM

How can I get excel to convert this time (as above) to show 13:45:01

Any help would be gratefully received.

Thanks

Coolkat






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
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
Running Excel 2000 VBA Application on Excel 2003 Excel Worksheet Functions 0 August 8th 06 06:04 PM
Using Excel 2000 VBA Application on Excel 2003 Excel Worksheet Functions 0 August 8th 06 02:36 AM
Excel should be able to format 12-hour times without am/pm Philip J. Rayment Excel Discussion (Misc queries) 5 January 31st 06 10:23 AM
Excel could not save all the data and formatting you recently ad.. Houndstooth Excel Worksheet Functions 0 April 18th 05 03:05 PM


All times are GMT +1. The time now is 07:29 AM.

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"