Hello
  
  formatdatetime did the job and gave to right opportunity, although it's a 
quite unsatisfying solution; 
  
  Trunc(A) = trucn (B) will not succeed as the timeof(A) part deliveres  
0,09999 and therefor trunc(A) deliveres a result of  ( dateof(A)  -1 )
  
  regards
  
  Andries

David Smith <[EMAIL PROTECTED]> wrote:          Even simpler: 
  
  If trunc(A) = trunc(B) Then //dateTimes are same day
  
  DJS
  
  
  --- Software Developer <[EMAIL PROTECTED]> wrote:
  
  >
  result:=formatdatetime('dd.mm.yy',a)=formatdatetime('dd.mm.yy',b);
  > 
  > 
  > --- Software Developer <[EMAIL PROTECTED]> wrote:
  > 
  > > Hello
  > > 
  > >  try this :
  > > 
  > >  function SameDay(a,b:DateTime):Boolean;
  > >  begin
  > >  
  > >
  >
  result:=formatdatetime('dd.mm.yy',a)=formatdatetime('dd.mm.yy',a);
  > >  end;
  > > 
  > > 
  > >  Regards 
  > >  Baran
  > > --- Andries Bos <[EMAIL PROTECTED]> wrote:
  > > 
  > > > Hello
  > > > 
  > > > I do have two TDateTime values to compare. 
  > > > 
  > > > var 
  > > > A: TDateTime;
  > > > B : TDateTime;
  > > > 
  > > > Debugging gives me a value for the variable of A
  > =
  > > > 38676 and B = 38676,1. Using the delhi debugging
  > > > function will show the values 
  > > > A :  (DateTimeToStr(A) : '20-11-2005' and
  > > > B :   (DateTimeToStr(B)  '20-11-2005 2:24:00'
  > > > 
  > > > I would like to compare these two dates and
  > check
  > > if
  > > > they are equal (on the same day). Dayofweek
  > would
  > > > not help because these dates could b within
  > > > different weeks  
  > > > 
  > > > However checking using the integrated debigger
  > var
  > > A
  > > > with either of the functions : DateOf(A) 
  > Trunc(A)
  > > > or Int(A) will all result in a value of 38675
  > !!. 
  > > > Doing the same with B will succeed en give me
  > the
  > > > value I would expect (38676). (As I'm doing
  > > > something conditional , the debugging values
  > will
  > > > also show at a normal run). 
  > > > I've tried to store the outcome of the functions
  > > > into a local variable, but this also does not
  > > solve
  > > > my problem.
  > > > 
  > > > Any suggestions?
  > > > 
  > > > regards
  > > > 
  > > > Andries
  > > > The Netherlands
  > > > 
  > > > 
  > > >             
  > > > ---------------------------------
  > > > Yahoo! Shopping
  > > >  Find Great Deals on Holiday Gifts at Yahoo!
  > > > Shopping 
  > > > 
  > > > [Non-text portions of this message have been
  > > > removed]
  > > > 
  > > > 
  > > 
  > > 
  > > 
  > >       
  > >             
  > > __________________________________ 
  > > Yahoo! for Good - Make a difference this year. 
  > > http://brand.yahoo.com/cybergivingweek2005/
  > > 
  > 
  > 
  > 
  >       
  >             
  > __________________________________ 
  > Yahoo! for Good - Make a difference this year. 
  > http://brand.yahoo.com/cybergivingweek2005/
  > 
  
  
  
        
              
  __________________________________ 
  Yahoo! for Good - Make a difference this year. 
  http://brand.yahoo.com/cybergivingweek2005/
            

    -----------------------------------------------------
  Home page: http://groups.yahoo.com/group/delphi-en/
  To unsubscribe: [EMAIL PROTECTED]  

                    
        
---------------------------------
    YAHOO! GROUPS LINKS  
  
      
    Visit your group "delphi-en" on the web.
     
    To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]
     
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.  
  
      
---------------------------------
  
  
          


                
---------------------------------
Yahoo! for Good - Make a difference this year. 

[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to