On Dec 11, 2006, at 5:00 PM, Charles Yeomans wrote:

Also note that ParseDate parses dates, not dates + times. So if you need to compare dates only, comparing TotalSeconds may not work. For this I use the following function.

Function Equals(extends d1 as Date, d2 as Date) as Boolean
  if d2 <> nil then
    const SecondsInOneDay = 86400.0
return (Floor(d1.TotalSeconds/SecondsInOneDay) = Floor (d2.TotalSeconds/SecondsInOneDay))
  else
    return false
  end if
End Function

Charles,
So, you are simply extending the function of an object (date) declared as d1? Or am not understanding this well...very likely. :-)

You said...."Also note that ParseDate parses dates, not dates + times. So if you need to compare dates only, comparing TotalSeconds may not work". Did you mean "dates with times" or did I miss that one too...again likely?

Michael.



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to