ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   time format (https://www.excelbanter.com/excel-programming/383302-time-format.html)

JT

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

joel

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



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com