Path: csiph.com!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.cgarbs.de!news.addix.net!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: "Theo Tress" Newsgroups: comp.lang.basic.visual.misc Subject: Re: converting a date to a date but without the time element Date: Sat, 7 Jul 2012 12:13:10 +0200 Organization: 1&1 Internet AG Lines: 20 Message-ID: References: NNTP-Posting-Host: dslb-094-217-088-136.pools.arcor-ip.net Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: online.de 1341656032 23333 94.217.88.136 (7 Jul 2012 10:13:52 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Sat, 7 Jul 2012 10:13:52 +0000 (UTC) In-Reply-To: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 Xref: csiph.com comp.lang.basic.visual.misc:1255 > My issue is that I want to compare this date with that of other dates > but at the moment they arent being evaluated as equal because of the > hours and minutes difference. try this: Dim D as Double Dim L as Long D = Now 'or any other date L = CLng(Fix(D)) Debug.Print D, L Fix() will truncate (and not round up) the hh:nn:ss part, and can handle long integers, so you can easily compare two dates: Dim SameDay as Boolean SameDay = CLng(Fix(D1)) = CLng(Fix(D2)) 'true if D1 refers to same day as D2