LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Finding times between 6pm and Midnight...

Hello,

I have a column which contains a full date and time, for example
2007-02-03 19:01:03. I need to create another column which will just
have 1 if it's after 6PM or 0 if before. I created a column called
Hour and using a Custom Format with just 'h' now have the hour in 24
hour format. I then created an if statement with this:
=IF(R217,1,0)

R2 is where the Hour field is. Problem is every field is 1. How can
I calculate the hour in a date field? Obviously the custom format is
only for display, and all calculations are still looking at the full
date. I'm using MS SQL 2007, but I assume any solution would work on
prior versions of Excel.

Thanks --

Alex

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding the combination that appears more times Alonso[_2_] Excel Worksheet Functions 9 February 12th 10 09:27 PM
Finding the number of times a word is used in a range of cells Ray Hill Excel Worksheet Functions 8 January 15th 09 07:21 PM
Variables with times between Midnight and 1:30am [email protected][_2_] Excel Programming 1 December 4th 06 11:24 PM
Macro for finding number of times a word repeats in a cell Vineeth Excel Programming 3 November 3rd 06 01:45 PM
Formula for finding the differance between two times DP01 Excel Worksheet Functions 1 April 4th 05 01:57 AM


All times are GMT +1. The time now is 05:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"