Results 1 to 2 of 2

Thread: compare

  1. #1
    Join Date
    Dec 1969

    Default compare

    Hi,<BR><BR>I have a date&time field in database I want to compare that against seconds in now() value.<BR><BR>I tried this<BR>if (datediff("N", now(),olddate )) &#060;50<BR><BR> ......<BR>end if.<BR><BR>But is not returning the value what i want .<BR>is it the righr sintax??<BR><BR>thanks<BR>julie

  2. #2
    Join Date
    Dec 1969

    Default N is miNutes...S is seconds...

    But I think you have the DateDiff backwards.<BR><BR>That is going to always give you a NEGATIVE values if "olddate" is prior to right now. So then it will always be less than 50.<BR><BR>I *THINK* you want<BR> If DateDiff("s", olddateFromDB, Now( ) ) &#060; 50 Then<BR> ...<BR> End If<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts