#1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default time format

I have a column for time in my spreadsheet. The value are as follows:

4:10:18 PM
10:29:30 AM
1:57:33 PM
10:13:20 AM

I would like to programatically change them to the following values:

04:10 PM
10:29 AM
01:57 PM
10:13 AM

I'm having trouble getting the results I want. When I fill a variable with
the hour for 4 PM, the value is 16.

Any suggestions would be appreciated. Thanks for the help.
--
JT
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default time format

did you try to refromat the cell using the format menu - cells - number -
date. there are lots off date formats that are avvailable.

"JT" wrote:

I have a column for time in my spreadsheet. The value are as follows:

4:10:18 PM
10:29:30 AM
1:57:33 PM
10:13:20 AM

I would like to programatically change them to the following values:

04:10 PM
10:29 AM
01:57 PM
10:13 AM

I'm having trouble getting the results I want. When I fill a variable with
the hour for 4 PM, the value is 16.

Any suggestions would be appreciated. Thanks for the help.
--
JT

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
How to format time in decimal format & calculate time Cheyenne Excel Discussion (Misc queries) 4 February 13th 09 04:34 PM
How to format time in decimal format & calculate time Cheyenne Excel Discussion (Misc queries) 1 February 13th 09 01:37 AM
How to format time in decimal format & calculate time Cheyenne Excel Discussion (Misc queries) 0 February 13th 09 12:49 AM
How to type format time in decimal format & calculate time Cheyenne Excel Discussion (Misc queries) 1 February 13th 09 12:09 AM
Remove time from a date and time field? Format removes the displa. oaoboc Excel Worksheet Functions 1 February 16th 05 07:20 PM


All times are GMT +1. The time now is 04:00 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"