Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extract hour from date
Hello,
I want to extract the from these cells only the hour: 9/3/2007 2:25:46 AM cell value must become 02 9/3/2007 2:25:46 PM cell value must become 14 I can use date format to show only "hh", but cell value is still "9/3/2007 2:25:46 AM" |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extract hour from date
Say your date and time is in A1. In some other cell enter "=Mod(A1,1)"
without the quotes, and format the cell for time. HTH Otto "Orhan" wrote in message ups.com... Hello, I want to extract the from these cells only the hour: 9/3/2007 2:25:46 AM cell value must become 02 9/3/2007 2:25:46 PM cell value must become 14 I can use date format to show only "hh", but cell value is still "9/3/2007 2:25:46 AM" |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extract hour from date
Hi,
It shows correct hour "02" but when I copy-pastevalues the cell value is still "2:25:46 AM" |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extract hour from date
Hi Orhan
Try this: if your date is in A1, then Hour(A1). Then format the cell as "00" Faisal... On 26 Oct, 21:35, Orhan wrote: Hi, It shows correct hour "02" but when I copy-pastevalues the cell value is still "2:25:46 AM" |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extract hour from date
Format the cell Custom - hh. That is, click Format - Cells - Number tab -
Custom, type hh for type. HTH Otto "Orhan" wrote in message ups.com... Hi, It shows correct hour "02" but when I copy-pastevalues the cell value is still "2:25:46 AM" |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extract hour from date
Say your date and time are in A1, as before. In another cell, type, without
quotes, "=HOUR(MOD(A1,1))" This will get you the hour. If you pastespecial - Values this to another cell you will get the hour only. HTH Otto "Orhan" wrote in message ups.com... Hi, It shows correct hour "02" but when I copy-pastevalues the cell value is still "2:25:46 AM" |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Extract hour from date
On Oct 27, 12:06 am, "Otto Moehrbach" wrote:
Say your date and time are in A1, as before. In another cell, type, without quotes, "=HOUR(MOD(A1,1))" This will get you the hour. If you pastespecial - Values this to another cell you will get the hour only. HTH Otto"Orhan" wrote in message ups.com... Hi, It shows correct hour "02" but when I copy-pastevalues the cell value is still "2:25:46 AM" Thanks, That did the trick. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
is it possible to set a cel to write the date and hour or date or | Excel Worksheet Functions | |||
Count by date and hour | Excel Worksheet Functions | |||
Extract the hour from a cell showing the date and time | Excel Worksheet Functions | |||
Convert Date/Time to the Hour | Excel Discussion (Misc queries) | |||
Subtracting date:hour from date:hour | Excel Worksheet Functions |