Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
How I can change the date type from dd/mm/yyyy hh:mm:ss to [hh]:mm:ss Thanks & Regards Hassan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For example:
sub test() Yourdate = 01/12/2007 22:00:01 YourHour = Format(Yourdate,"hh:mm:ss") msgbox Yourdate End sub -- Regards, Halim "Hassan" wrote: Hi All, How I can change the date type from dd/mm/yyyy hh:mm:ss to [hh]:mm:ss Thanks & Regards Hassan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think it would be better to add a "Time" style to your workbook,
instead of re-defining the "Date" style. Changing the style would be confusing to other users, if you forward the workbook to them. To add a new style to your workbook (instructions for Excel 2000): 1. Choose the Style command from the Format menu. 2. Type in "Time" in the "Style name" combo box. 3. Uncheck all of the checkboxes except "Number". 4. Click the Add button. 5. Click the Modify button to display the Format Cells dialog box, then choose "Time" in the Category list box, and one of the time formats in the Type list box. 6. Click OK in the Format Cells dialog box. 7. Click Close or OK in the Style dialog box. Use this "Time" style to format all of the cells you want. If you don't have the style combo box displayed on your Formatting toolbar, add it by using the Customize feature. (Microsoft started leaving the Style box off of the toolbar with Excel 2000. I don't know if they have added it back in more recent versions or not. Maybe Styles have even gone away in the latest version!) -- Regards, Bill Renaud |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
My date is coming up 0-Jan-00 when I type current date. Why? | Excel Discussion (Misc queries) | |||
This date 20071017072917 into this type of date 10/17/2007 29:17 | Excel Discussion (Misc queries) | |||
how to convert date type to text type | Excel Discussion (Misc queries) | |||
How do you add one date to another? I type in 1/31/05 in A1 and I. | Excel Worksheet Functions | |||
Why can't I type in a date? | Excel Discussion (Misc queries) |