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: 88
Default How do a logical test on times in two different formats?

Help another brainlock here. Am trying figure out why this logical
comparison turns out false? I am comparing two different times one
being in format 0.206 (4:57 being the time) the other time is
MinFltArrival = "13:00". I know this is a unit conversion issue but
haven't figured out yet how to deal with it.

formatdatetime(cells(Rowx,8)) =0.206 (So 4:57 is in a decimal
format.)
MinFltArrival="13:00" (13:00 is in hh:mm
format)

the logical test.
? formatdatetime(cells(Rowx,8)) < format(MinFltArrival, "0.###")
False

The test should be coming out true because I was hoping to be
performing the IF statement of 04:57 < 13:00 and it should be YES. So
the question is how can I compare these two times the right way
considering one is in decimal format and the other is in hh:mm format?

Thanks,
Chet
 
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
Can I use 'CONTAINS' in an IF Logical Test? MichaelRobert Excel Worksheet Functions 3 April 2nd 23 08:11 PM
Logical test Sherees Excel Discussion (Misc queries) 3 December 12th 09 09:27 AM
Logical Test AFA Excel Worksheet Functions 2 May 13th 08 02:56 AM
Logical test kw_uh97 Excel Programming 0 June 29th 07 04:12 PM
Logical test retiredguy New Users to Excel 2 January 27th 07 05:56 PM


All times are GMT +1. The time now is 06:04 AM.

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

About Us

"It's about Microsoft Excel"