ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date comparison between 2 datetime fields (https://www.excelbanter.com/excel-programming/434589-date-comparison-between-2-datetime-fields.html)

Rita Brasher[_2_]

Date comparison between 2 datetime fields
 
I have 2 cells containing datetime values. I need to compare just the
date portion of the cells. eg: (If( Date(Cell1) <= Date(Cell2),1,0)

By what means can I get there as the example doesn't work.

Thanks in advance for any help you can provide!

Rita Brasher
Project Engineer
FedEx Express / Int'l MIS and Training

Dave Peterson

Date comparison between 2 datetime fields
 
Just look at the integer portion of the cells:

if int(cell1.value) = int(cell2.value) then



Rita Brasher wrote:

I have 2 cells containing datetime values. I need to compare just the
date portion of the cells. eg: (If( Date(Cell1) <= Date(Cell2),1,0)

By what means can I get there as the example doesn't work.

Thanks in advance for any help you can provide!

Rita Brasher
Project Engineer
FedEx Express / Int'l MIS and Training


--

Dave Peterson


All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com