ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Time format (https://www.excelbanter.com/excel-discussion-misc-queries/223192-time-format.html)

clcnewtoaccess

Time format
 
I have formatted my cells as 12:00:00, but when I do a ctrl+shift+: it always
shows the seconds as 00 (example 10:37:00 should be 10:37:18). I have tried
all of the time formats that look like what I need but nothing works. This
is being done on a HP Jornada pocket PC.
Any Ideas?
--
clcnewtoaccess

Gary''s Student

Time format
 
The shortcut does not supply seconds. Use:
=NOW()
--
Gary''s Student - gsnu200836


"clcnewtoaccess" wrote:

I have formatted my cells as 12:00:00, but when I do a ctrl+shift+: it always
shows the seconds as 00 (example 10:37:00 should be 10:37:18). I have tried
all of the time formats that look like what I need but nothing works. This
is being done on a HP Jornada pocket PC.
Any Ideas?
--
clcnewtoaccess


clcnewtoaccess

Time format
 
I still get the same results, seconds are always :00
Any other suggestions?
--
clcnewtoaccess


"Gary''s Student" wrote:

The shortcut does not supply seconds. Use:
=NOW()
--
Gary''s Student - gsnu200836


"clcnewtoaccess" wrote:

I have formatted my cells as 12:00:00, but when I do a ctrl+shift+: it always
shows the seconds as 00 (example 10:37:00 should be 10:37:18). I have tried
all of the time formats that look like what I need but nothing works. This
is being done on a HP Jornada pocket PC.
Any Ideas?
--
clcnewtoaccess


Gary''s Student

Time format
 
Format Cells... Number Custom hh:mm:ss
--
Gary''s Student - gsnu200836


"clcnewtoaccess" wrote:

I still get the same results, seconds are always :00
Any other suggestions?
--
clcnewtoaccess


"Gary''s Student" wrote:

The shortcut does not supply seconds. Use:
=NOW()
--
Gary''s Student - gsnu200836


"clcnewtoaccess" wrote:

I have formatted my cells as 12:00:00, but when I do a ctrl+shift+: it always
shows the seconds as 00 (example 10:37:00 should be 10:37:18). I have tried
all of the time formats that look like what I need but nothing works. This
is being done on a HP Jornada pocket PC.
Any Ideas?
--
clcnewtoaccess


Dave Peterson

Time format
 
I've added a macro to my personal.xl* file that steals the ctrl-shift-colon
function and replaces it with what I want.

Saved from a previous post:

If you want to try, create a workbook that includes this code and store it in
your XLStart folder. Lots of people use a workbook named Personal.xls for this
kind of thing.

Option Explicit
Sub Auto_Open()
Application.OnKey "+^:", "'" & ThisWorkbook.Name & "'!Nowtime"
End Sub
Sub Auto_Close()
Application.OnKey "+^:"
End Sub
Sub NowTime()
On Error Resume Next
With Selection
.Value = Now
.NumberFormat = "hh:mm:ss"
End With
If Err.Number < 0 Then
Beep
Err.Clear
End If
On Error Goto 0
End Sub


If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

clcnewtoaccess wrote:

I have formatted my cells as 12:00:00, but when I do a ctrl+shift+: it always
shows the seconds as 00 (example 10:37:00 should be 10:37:18). I have tried
all of the time formats that look like what I need but nothing works. This
is being done on a HP Jornada pocket PC.
Any Ideas?
--
clcnewtoaccess


--

Dave Peterson


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

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