Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format time to hh:mm? and 24h?
Hi
I am trying to get time to format to only show hour and minutes (no seconds). But this code does not work. How shall I do? And how can I make it to show 24h in stead of AM/PM? The Region Date and Time on my pc is changed to English(USA) to simplify it. Thanks Rolf Sub HoursAndMinutes() Dim aTime As String Dim bTime As Date Dim cTime As Date aTime = "10:31:42" bTime = CDate(aTime) cTime = Format(bTime, "hh:mm") MsgBox (cTime) End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to format time in decimal format & calculate time | Excel Discussion (Misc queries) | |||
How to format time in decimal format & calculate time | Excel Discussion (Misc queries) | |||
How to format time in decimal format & calculate time | Excel Discussion (Misc queries) | |||
How to type format time in decimal format & calculate time | Excel Discussion (Misc queries) | |||
Remove time from a date and time field? Format removes the displa. | Excel Worksheet Functions |