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! 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/