View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Moehrbach Otto Moehrbach is offline
external usenet poster
 
Posts: 1,090
Default 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"